# @streammedev/react-compat

> A module to maintain components with broad React version compatibility

Latest version **0.0.0** (published 2017-05-17) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install @streammedev/react-compat
pnpm add @streammedev/react-compat
yarn add @streammedev/react-compat
bun add @streammedev/react-compat
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2017-05-17 |
| First published | 2017-05-17 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | StreamMe |
| Maintainers | streammedev |
| Keywords | react, compatiblity |

## Links

- npm: https://www.npmjs.com/package/@streammedev/react-compat
- Repository: https://github.com/StreamMeDev/react-compat
- Homepage: https://github.com/StreamMeDev/react-compat#readme
- Issues: https://github.com/StreamMeDev/react-compat/issues
- npm.io page: https://npm.io/package/@streammedev/react-compat

## Dependencies (1)

- [semver](https://npm.io/package/semver.md) ^5.3.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.0 (latest) — 2017-05-17

## README

# React Runtime Compatibility Layer

[![js-happiness-style](https://img.shields.io/badge/code%20style-happiness-brightgreen.svg)](https://github.com/JedWatson/happiness)

A module to maintain components with broad React version compatibility.  This module can be
used to have React components which are compatible from versions `0.12.0` through `15.5.2`.
As new versions of react come out we will add to this as we go.

## Install

```
$ npm install --save @streammedev/react-compat
```

### With React `>15.5.0`

With newer React's you need to also install `prop-types` and `create-react-class`.

```
$ npm install --save prop-types create-react-class
```

## Usage

```javascript
var React = require('React')
var reactCompat = require('@streammedev/react-compat')

var MyComponent = reactCompat.createClass({
  propTypes: {
    foo: reactCompat.PropTypes.object
  },
  render: function () {
    return <div ref={reactCompat.refSet(this, 'myRef')} onClick={this.doSomething} />
  },
  doSomething: function () {
    var domNode = reactCompat.refGet(this, 'myRef')
    // Do something with the dom node
  }
})
```

## Development

This 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:

```
$ npm version patch
$ git push
$ npm publish
```

Here are the other types of version bumps:

- Major (`npm version major`): This is for breaking changes.  Anytime a method is changed or the functionality is modified this bump should be made.
- 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.
- 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)

For each of these you can run a 'pre' version by prepending to the command, ex `npm version preminor`.

All 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.  To install that 'pre' version of the package do the following, where the version number contains the correct 'pre' version:

```
$ npm install --save @streamme/react-compat@1.0.0-0
```

Running the tests:

```
$ npm install && npm test
```

---
_Source: https://npm.io/package/@streammedev/react-compat · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
