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.
Helps to omit unnecessary context prop, state setters or anything else you don't want to propagate and {...spread}
to Component.
Provides a handy way to use some of React Component Lifecycle methods.
Dynamically map CSS Media Queries matches to boolean props using window.matchMedia()
(MDN, Can I use).
Helps to debounce handlers like onChange
.
Helps to throttle handlers like onChange
.
You can follow me on Twitter for updates.
- Create a new folder in
packages/
, let's saywith-foo
. - See
package.json
in already existing packages and create newwith-foo/package.json
. - Put source code in
with-foo/src/
, it will be transpiled and bundled intowith-foo/dist/
,with-foo/lib/
andwith-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