1.2.0 • Published 4 years ago
hoc-with-props v1.2.0
hoc-with-props
Higher-order component for map object with props
Install
npm install --save hoc-with-props
Usage
import * as React from "react";
import { withProps } from "hoc-with-props";
const Component = props => <div {...props}>{"Test component"}</div>;
const ComponentWithProps = withProps({ isTestProp: true })(TestComponent);
const ComponentWithPropsFunc = withProps({ isTestProp: true })(TestComponent);
License
MIT © artemgafarov66
These tools are created using create-react-hook.