Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

hoist-non-react-statics

Package Overview
Dependencies
1
Maintainers
1
Versions
33
Issues
File Explorer

Advanced tools

hoist-non-react-statics

Copies non-react specific statics from a child component to a parent component

    3.3.2latest

Version published
Maintainers
1
Weekly downloads
15,078,403
increased by8.69%

Weekly downloads

Readme

Source

hoist-non-react-statics

NPM version Build Status Coverage Status Dependency Status devDependency Status

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.

$ npm install --save hoist-non-react-statics

Usage

import hoistNonReactStatics from 'hoist-non-react-statics'; hoistNonReactStatics(targetComponent, sourceComponent);

If you have specific statics that you don't want to be hoisted, you can also pass a third parameter to exclude them:

hoistNonReactStatics(targetComponent, sourceComponent, { myStatic: true, myOtherStatic: true });

What does this module do?

See this explanation from the React docs.

Compatible React Versions

Please use latest 3.x. Versions prior to 3.x will not support ForwardRefs.

hoist-non-react-statics VersionCompatible React Version
3.x0.13-16.x With ForwardRef Support
2.x0.13-16.x Without ForwardRef Support
1.x0.13-16.2

Browser Support

This package uses Object.defineProperty which has a broken implementation in IE8. In order to use this package in IE8, you will need a polyfill that fixes this method.

License

This software is free to use under the Yahoo Inc. BSD license. See the LICENSE file for license text and copyright information.

Third-party open source code used are listed in our package.json file.

Keywords

FAQs

What is hoist-non-react-statics?

Copies non-react specific statics from a child component to a parent component

Is hoist-non-react-statics popular?

The npm package hoist-non-react-statics receives a total of 12,215,351 weekly downloads. As such, hoist-non-react-statics popularity was classified as popular.

Is hoist-non-react-statics well maintained?

We found that hoist-non-react-statics demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 22 Jan 2020

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc