d2-ui
Version:
38 lines (26 loc) • 1.71 kB
Markdown
# hoist-non-react-statics
[](http://badge.fury.io/js/hoist-non-react-statics)
[](https://travis-ci.org/mridgway/hoist-non-react-statics)
[](https://coveralls.io/r/mridgway/hoist-non-react-statics?branch=master)
[](https://david-dm.org/mridgway/hoist-non-react-statics)
[](https://david-dm.org/mridgway/hoist-non-react-statics#info=devDependencies)
Copies non-react specific statics from a child component to a parent component.
Similar to `Object.assign`, but with React static keywords blacklisted from
being overridden.
```bash
$ npm install --save hoist-non-react-statics
```
## Usage
```js
import hoistNonReactStatic from 'hoist-non-react-statics';
hoistNonReactStatic(targetComponent, sourceComponent);
```
## Compatible React Versions
| Compatible React Version | hoist-non-react-statics Version |
|--------------------------|-------------------------------|
| 0.13-0.14 | >= 1.0.0 |
## License
This software is free to use under the Yahoo Inc. BSD license.
See the [LICENSE file][] for license text and copyright information.
[LICENSE file]: https://github.com/mridgway/hoist-non-react-statics/blob/master/LICENSE.md
Third-party open source code used are listed in our [package.json file]( https://github.com/mridgway/hoist-non-react-statics/blob/master/package.json).