Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { compose, withProps, mapProps } from 'recompose';
- const namespace = (namespace, ...hocs) =>
- compose(
- withProps(props => ({ $parentProps: props })),
- ...hocs,
- mapProps(props => ({ [namespace]: props, ...props.$parentProps })),
- );
- export default namespace;
Add Comment
Please, Sign In to add comment