3.3.2 • Published 4 years ago

hoist-non-react-statics v3.3.2

Weekly downloads
10,535,678
License
BSD-3-Clause
Repository
github
Last release
4 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-themingreact-hot-loaderrecompose@material-ui/core@material-ui/styles@apollo/clientformik42-pro-react-native-code-push@modern-js/runtime@modern-js/plugin-tailwindcss@procore/labs-markup-toolbars@overtheairbrew/next-i18next@plone/volto@nocturne92/redux-falcor@modern-js/plugin-garfish@modern-js/plugin-router-v5@contiago/toolbar@gooddata/react-components@gooddata/sdk-ui@gooddata/sdk-ui-charts@grafana/ui@elliemae/ds-shared@instructure/emotion@instructure/ui-i18neasy-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
3.3.2

4 years ago

3.3.1

5 years ago

3.3.0

5 years ago

3.2.1

6 years ago

3.2.0

6 years ago

3.1.0

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

3.0.0-rc.1

6 years ago

3.0.0-rc.0

6 years ago

2.5.5

6 years ago

2.5.4

6 years ago

2.5.3

6 years ago

2.5.2

6 years ago

2.5.1

6 years ago

2.5.0

6 years ago

2.3.1

7 years ago

2.3.0

7 years ago

2.2.2

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago