decorate-component-with-props

Utility function for decorating a React component with any props

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
decorate-component-with-props
2301.2.18 months ago7 years agoMinified + gzip package size for decorate-component-with-props in KB

Readme

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