1 | # hoist-non-react-statics
|
2 |
|
3 | [![NPM version](https://badge.fury.io/js/hoist-non-react-statics.svg)](http://badge.fury.io/js/hoist-non-react-statics)
|
4 | [![Build Status](https://img.shields.io/travis/mridgway/hoist-non-react-statics.svg)](https://travis-ci.org/mridgway/hoist-non-react-statics)
|
5 | [![Coverage Status](https://img.shields.io/coveralls/mridgway/hoist-non-react-statics.svg)](https://coveralls.io/r/mridgway/hoist-non-react-statics?branch=master)
|
6 | [![Dependency Status](https://img.shields.io/david/mridgway/hoist-non-react-statics.svg)](https://david-dm.org/mridgway/hoist-non-react-statics)
|
7 | [![devDependency Status](https://img.shields.io/david/dev/mridgway/hoist-non-react-statics.svg)](https://david-dm.org/mridgway/hoist-non-react-statics#info=devDependencies)
|
8 |
|
9 | Copies non-react specific statics from a child component to a parent component.
|
10 | Similar to `Object.assign`, but with React static keywords blacklisted from
|
11 | being overridden.
|
12 |
|
13 | ```bash
|
14 | $ npm install --save hoist-non-react-statics
|
15 | ```
|
16 |
|
17 | ## Usage
|
18 |
|
19 | ```js
|
20 | import hoistNonReactStatic from 'hoist-non-react-statics';
|
21 |
|
22 | hoistNonReactStatic(targetComponent, sourceComponent);
|
23 | ```
|
24 |
|
25 | ## What does this module do?
|
26 |
|
27 | See this [explanation](https://facebook.github.io/react/docs/higher-order-components.html#static-methods-must-be-copied-over) from the React docs.
|
28 |
|
29 | ## Compatible React Versions
|
30 |
|
31 | | Compatible React Version | hoist-non-react-statics Version |
|
32 | |--------------------------|-------------------------------|
|
33 | | 0.13-15.0 | >= 1.0.0 |
|
34 |
|
35 | ## License
|
36 | This software is free to use under the Yahoo Inc. BSD license.
|
37 | See the [LICENSE file][] for license text and copyright information.
|
38 |
|
39 | [LICENSE file]: https://github.com/mridgway/hoist-non-react-statics/blob/master/LICENSE.md
|
40 |
|
41 | 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).
|