Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 18, 2024 via pnpm

hoist-non-react-statics 3.3.2

Copies non-react specific statics from a child component to a parent component
Package summary
Share
0
issues
2
licenses
1
BSD-3-Clause
1
MIT
Package created
27 May 2015
Version published
22 Jan 2020
Maintainers
1
Total deps
2
Direct deps
1
License
BSD-3-Clause

Issues

0
This package has no issues

Licenses

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
hoist-non-react-statics@3.3.2

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
react-is@16.13.1
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

1
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
react-is16.13.15.33 kBMIT
prod

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.