MCPcopy
hub / github.com/mridgway/hoist-non-react-statics

github.com/mridgway/hoist-non-react-statics @v3.3.2 sqlite

repository ↗ · DeepWiki ↗ · release v3.3.2 ↗
23 symbols 45 edges 3 files 0 documented · 0%
README

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 Version Compatible React Version
3.x 0.13-16.x With ForwardRef Support
2.x 0.13-16.x Without ForwardRef Support
1.x 0.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.

Core symbols most depended-on inside this repo

hoistNonReactStatics
called by 12
src/index.js
getStatics
called by 2
src/index.js
camelCase
called by 1
rollup.config.js
getMeta
called by 1
tests/unit/index.js
logProps
called by 1
tests/unit/index.js
external
called by 0
rollup.config.js
getMeta2
called by 0
tests/unit/index.js
render
called by 0
tests/unit/index.js

Shape

Class 12
Function 7
Method 4

Languages

TypeScript100%

Modules by API surface

tests/unit/index.js19 symbols
src/index.js2 symbols
rollup.config.js2 symbols

Dependencies from manifests, versioned

@babel/core7.5.0 · 1×
@babel/plugin-proposal-class-properties7.5.0 · 1×
@babel/preset-env7.5.0 · 1×
@babel/preset-react7.0.0 · 1×
@babel/register7.4.4 · 1×
chai4.2.0 · 1×
coveralls2.11.1 · 1×
create-react-class15.5.3 · 1×
eslint4.13.1 · 1×
mocha6.1.4 · 1×
nyc14.1.1 · 1×
pre-commit1.0.7 · 1×

For agents

$ claude mcp add hoist-non-react-statics \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact