Search the Community
Showing results for tags 'passing'.
-
@hocs A collection of Higher-Order Components for React, especially useful with Recompose. A Higher-Order Component is a function that takes a component and returns a new component. Packages omit-props Helps to omit unnecessary context, state setters or anything else you don't want to propagate with {...spread}. with-lifecycle Provides a handy way to use some of React Component Lifecycle methods. with-match-media-props Dynamically map CSS Media Queries matches to boolean props using window.matchMedia() (Can I use?). debounce-handler Helps to debounce handlers like onChange. throttle-handler Helps to throttle handlers like onChange. prevent-handlers-default Decouples e.preventDefault() side effect from handlers like form submitting or clicking a link. …and more to come You can follow me on Twitter for updates. Development Create a new folder in packages/, let's say with-foo. See package.json in already existing packages and create new with-foo/package.json. Put source code in with-foo/src/, it will be transpiled and bundled into with-foo/dist/, with-foo/lib/ and with-foo/es/. Put tests written with Jest in with-foo/test/. Put demo in with-foo/demo/, it will be rendered and wrapped with HMR. Available scripts using Start: yarn start build <package> yarn start demo <package> yarn start test yarn start testWatch yarn start lint Download hocs-master.zip Source: https://github.com/deepsweet/hocs
-
- 2
-
- hocs
- higher-order components
- (and 4 more)