with-wrapper
v1.0.1
Published
React HOC for wrapper components.
Downloads
130
Readme
with-wrapper
React HOC for wrapper components.
Usage
import {withWrapper} from 'with-wrapper'
export const App = withWrapper((element, props) => (
<div className="wrapper">
{element}
</div>
))((props) => {
return (
<p>
This is App.
</p>
)
})
The above component will be rendered as:
<div class="wrapper">
<p>
This is App.
</p>
</div>