1.0.0 • Published 4 years ago

react-with-hocs v1.0.0

Weekly downloads
38
License
MIT
Repository
github
Last release
4 years ago

react-with-hocs

npm version

A helper to compose React HOCs. Unlike the compose function, which is usually used in such cases, the withHocs receives the component first. This allows typescript to automatically infer types of HOCs, so you need not specify them manually.

import withHocs from "react-with-hocs";

...

export default withHocs(Component)(
  HOC1,
  HOC2,
  HOC3,
  ...
);