Last active
January 21, 2018 17:26
-
-
Save gregberge/410ab385abd31152f468daeefcb40ee8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import identity from './identity'; | |
| import createHelper from 'recompose/createHelper'; | |
| import createEagerElement from 'recompose/createEagerElement'; | |
| export default createHelper((Wrapper, mapProps) => Component => props => { | |
| mapProps = mapProps || identity; | |
| return ( | |
| <Wrapper {...mapProps(props)}> | |
| {createEagerElement(Component, props)} | |
| </Wrapper> | |
| ); | |
| }, 'wrapInto'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment