react-with-hocs
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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,
  ...
);

Readme

Keywords

Package Sidebar

Install

npm i react-with-hocs

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

10.1 kB

Total Files

10

Last publish

Collaborators

  • megazazik