3.3.2 • Published 6 years ago

hoist-non-react-statics v3.3.2

Weekly downloads
10,535,678
License
BSD-3-Clause
Repository
github
Last release
6 years ago

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.

@types/hoist-non-react-staticsemotion-theming@types/react-reduxformikreact-hot-loaderrecompose@material-ui/core@material-ui/styles42-pro-react-native-code-push@procore/labs-markup-toolbars@overtheairbrew/next-i18next@nocturne92/redux-falcor@contiago/toolbareasy-select-rn@sweetwater-cloud/fdx@demo-waed/apm-rum-react@invoice-simple/react-intl@invoice-simple/react-navigation@jkossis/apollo-client@nikmen/directorr-reactdefi-finder-calculatoramerican-golf-kioskreact-native-code-push-ptm@artibulles-cis/reactletgo-web-trackerreact-native-offline-utils@timbastin/react-native-calendars@nvphuong92/react-native-elements@miot-plugin/react-native-ui-kittencrehana-material-ui@epranka/test-form-schema@that1matt/react-css-themr@yushicheng/promise-constant@hi-ui/hiui2hivelocity-verificationreact-navigation-tabs-k4button-animations-reactinject-modal@darcusfenix/react-redux@darcusfenix/redux-formrc-form-zp@arisageha/react-lazyload@arisageha/react-lazyload-fixassrnext-i18next-urlwmzy-mobile@artiweb.artibulles/artiweb-reactartiweb-reactmikedemarais-styled-components@mtgroup/ui_revolution@jaslong/grommetvaluecouponmy-react-redux-typescomponent-support@homeexchange/react-roulette464e417freshpaint-react-nativespain-react-native-calendarsreact-redux-combine-componentsgoldmine-clientpiral-compass-basereact-native-template-rfbase@ketcher/reactpiral-compass-tooltipreact-native-in-app-notification-forksemantic-ui-react-native@mosquito-ui/coolstyle@esgca-material-ui/coreredux-form-5mattermost-webapp-libmahsingh-iics-componentsreactivesearchuibrugsdistroreact-dnd-window-scroll@jimmychang/react-native-code-pushreact-validonwi-react-native-code-pushyuki-tsw-react-native-ui@kichiyaki/next-i18nextjw-react-naver-maps@texttree/demo-bsa-reference-rcl@ui5-webcomponents-react/baseformik-fix-swallow-errorsreact-beautifull-dnd-scrollzoneares-nextzarm213213zarm232323@hai5/react-navigation@bamboo-design/sea@privy-eng/notice@rexlabs-spicerhaart/element-styles@cloudkite/nextstrapi-new-admin@artanaliji/apollo-clientnew-rollup-testhexidave-material-ui-corehexidave-material-ui-nextluna-frontapplicatik-ui-libgep-ignition
3.3.2

6 years ago

3.3.1

6 years ago

3.3.0

7 years ago

3.2.1

7 years ago

3.2.0

7 years ago

3.1.0

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

3.0.0-rc.1

7 years ago

3.0.0-rc.0

7 years ago

2.5.5

8 years ago

2.5.4

8 years ago

2.5.3

8 years ago

2.5.2

8 years ago

2.5.1

8 years ago

2.5.0

8 years ago

2.3.1

8 years ago

2.3.0

8 years ago

2.2.2

8 years ago

2.2.1

8 years ago

2.2.0

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago