with-wrapper
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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>

/with-wrapper/

    Package Sidebar

    Install

    npm i with-wrapper

    Weekly Downloads

    13

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3.89 kB

    Total Files

    6

    Last publish

    Collaborators

    • awmleer