{"id":24667214,"url":"https://github.com/streammedev/react-compat","last_synced_at":"2026-04-09T18:51:53.155Z","repository":{"id":57163115,"uuid":"91606245","full_name":"StreamMeDev/react-compat","owner":"StreamMeDev","description":"A runtime React compatibility layer","archived":false,"fork":false,"pushed_at":"2017-05-17T18:22:30.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T12:15:27.689Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StreamMeDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-17T18:09:04.000Z","updated_at":"2017-05-17T18:09:21.000Z","dependencies_parsed_at":"2022-09-01T03:02:36.198Z","dependency_job_id":null,"html_url":"https://github.com/StreamMeDev/react-compat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreamMeDev%2Freact-compat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreamMeDev%2Freact-compat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreamMeDev%2Freact-compat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreamMeDev%2Freact-compat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StreamMeDev","download_url":"https://codeload.github.com/StreamMeDev/react-compat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244795520,"owners_count":20511521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-26T08:16:10.412Z","updated_at":"2025-10-29T00:34:09.963Z","avatar_url":"https://github.com/StreamMeDev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Runtime Compatibility Layer\n\n[![NPM Version](https://img.shields.io/npm/v/@streammedev/react-compat.svg)](https://npmjs.org/package/@streammedev/react-compat)\n[![NPM Downloads](https://img.shields.io/npm/dm/@streammedev/react-compat.svg)](https://npmjs.org/package/react-compat)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nA module to maintain components with broad React version compatibility.  This module can be\nused to have React components which are compatible from versions `0.12.0` through `15.5.2`.\nAs new versions of react come out we will add to this as we go.\n\nProvides compatibility for:\n\n- Refs: Strings for pre 0.13, functions for after 0.14 and normalizes getting the dom node\n- Create React Class: For after 15.5, includes the standalone module\n- Prop Types: After 15.5 includes the standalone module\n\n## Install\n\n```\n$ npm install --save @streammedev/react-compat\n```\n\n### With React `\u003e15.5.0`\n\nWith newer React's you need to also install `prop-types` and `create-react-class`.\n\n```\n$ npm install --save prop-types create-react-class\n```\n\n## Usage\n\n```javascript\nvar React = require('React')\nvar reactCompat = require('@streammedev/react-compat')\n\nvar MyComponent = reactCompat.createClass({\n  propTypes: {\n    foo: reactCompat.PropTypes.object\n  },\n  render: function () {\n    return \u003cdiv ref={reactCompat.refSet(this, 'myRef')} onClick={this.doSomething} /\u003e\n  },\n  doSomething: function () {\n    var domNode = reactCompat.refGet(this, 'myRef')\n    // Do something with the dom node\n  }\n})\n```\n\n## Development\n\nThis package follows semver.  When you wish to publish a version run the proper npm command.  For example, if we made a bug fix you can do this:\n\n```\n$ npm version patch\n$ git push\n$ npm publish\n```\n\nHere are the other types of version bumps:\n\n- Major (`npm version major`): This is for breaking changes.  Anytime a method is changed or the functionality is modified this bump should be made.\n- Minor (`npm version minor`): This is for features additions.  When a new method is added which doesn't affect the behavior of existing features, this bump should be made.\n- Patch (`npm version patch`): This is for bug fixes.  Only bump this if it is safe for production code to update wihout being QA'd.  (AKA, almost never)\n\nFor each of these you can run a 'pre' version by prepending to the command, ex `npm version preminor`.\n\nAll feature development should be done on a branch off `master`.  When a feature is complete and the pull request approved, publish a 'pre' version of the package for testing across environments.\nTo install that 'pre' version of the package do the following, where the version number contains the correct 'pre' version:\n\n```\n$ npm install --save @streammedev/react-compat@1.0.0-0\n```\n\nRunning the tests:\n\n```\n$ npm install \u0026\u0026 npm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreammedev%2Freact-compat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreammedev%2Freact-compat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreammedev%2Freact-compat/lists"}