Guest User

Untitled

a guest
Dec 15th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. import { compose, withProps, mapProps } from 'recompose';
  2.  
  3. const namespace = (namespace, ...hocs) =>
  4. compose(
  5. withProps(props => ({ $parentProps: props })),
  6. ...hocs,
  7. mapProps(props => ({ [namespace]: props, ...props.$parentProps })),
  8. );
  9.  
  10. export default namespace;
Add Comment
Please, Sign In to add comment