decorate-component-with-props

1.2.1 • Public • Published

A simple function to decorate your component with miscellaneous props:

Example:

import decorateComponentWithProps from 'decorate-component-with-props';

const props = {
  wine: 'red',
  beer: 'ipa',
  food: 'spaghetti',
};

MyDecoratedComponent = decorateComponentWithProps(MyComponent, props);

// MyDecoratedComponent will now be decorated with these props

Dependencies (0)

    Dev Dependencies (14)

    Package Sidebar

    Install

    npm i decorate-component-with-props

    Weekly Downloads

    34,339

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    5.07 kB

    Total Files

    9

    Last publish

    Collaborators

    • nikgraf
    • juliankrispel