Higher-order component for map object with props
npm install --save hoc-with-propsimport * 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);MIT © artemgafarov66
These tools are created using create-react-hook.