with-wrapper

React HOC for wrapper components.

Usage no npm install needed!

<script type="module">
  import withWrapper from 'https://cdn.skypack.dev/with-wrapper';
</script>

README

with-wrapper

GitHub npm version npm downloads React

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>