decorate-component-with-props
v1.2.1
Published
Utility function for decorating a React component with any props
Downloads
157,794
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