Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 18, 2024 via pnpm

hoist-non-react-statics 1.0.3

Copies non-react specific statics from a child component to a parent component
Package summary
Share
2
issues
1
high severity
license
1
1
low severity
license
1
1
license
1
BSD
Package created
27 May 2015
Version published
10 Aug 2015
Maintainers
1
Total deps
1
Direct deps
0
License
UNKNOWN

Issues

2

1 high severity issue

high
Recommendation: Validate that the package complies with your license policy
via: hoist-non-react-statics@1.0.3
Collapse
Expand

1 low severity issue

low
Recommendation: Read and validate the license terms
via: hoist-non-react-statics@1.0.3
Collapse
Expand

Licenses

BSD

Invalid
Not OSI Approved
1 Packages, Including:
hoist-non-react-statics@1.0.3
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of hoist-non-react-statics 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does hoist-non-react-statics do?

Hoist-non-react-statics is a JavaScript library that allows copying of non-react specific statics from a child component to a parent component. This is analogous to Object.assign, but with a special feature: React static keywords are blacklisted from being overridden. This library plays a key role in aiding highest order components (HOCs) in JavaScript programming, particularly when working with React.

How do you use hoist-non-react-statics?

To use hoist-non-react-statics, first install the library into your project using npm with the following command in your terminal: npm install --save hoist-non-react-statics. Once installed, you can go ahead and import the library into your .js file like this:

import hoistNonReactStatics from 'hoist-non-react-statics';

Then use the hoistNonReactStatics() function by passing it two arguments: the target component and the source component, in that order. Here's an example,

hoistNonReactStatics(targetComponent, sourceComponent);

If there are specific statics you want to exclude from being hoisted, you can specify them in a third parameter like so:

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

Where are the hoist-non-react-statics docs?

The main source of documentation for hoist-non-react-statics can be found at the project's GitHub repository (https://github.com/mridgway/hoist-non-react-statics). For an in-depth understanding of what this library does, consider reviewing the explanation provided in the React documentation regarding higher-order components.