1.2.0 • Published 4 years ago

hoc-with-props v1.2.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

hoc-with-props

Higher-order component for map object with props

NPM JavaScript Style Guide

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.