1.0.0 • Published 5 years ago
react-with-hocs v1.0.0
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,
...
);