const NewComponent = withHocs([withWrapper(A), withWrapper(B)])(MyComponent)
<A>
<B>
<NewComponent ... />
</B>
</A>
const MyComponent = (() => {
function MyComponent(props: { ... }) {
return <OtherComponents />;
}
return withHocs([ ... ])(MyComponent);
})();
import { withHoc1, withHoc1 } from 'my-hocs'
// `withHoc1_2` can be used somewhere else
export const withHoc1_2 = withHocs([withHoc1, withHoc2])
Generated using TypeDoc
Apply multiple hocs