react-with-hocs
v1.0.0
Published
A helper to compose React HOCs
Downloads
91
Readme
react-with-hocs
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,
...
);