|
|
пре 3 година | |
|---|---|---|
| .. | ||
| dist | пре 3 година | |
| src | пре 3 година | |
| LICENSE | пре 3 година | |
| README.md | пре 3 година | |
| package.json | пре 3 година | |
A function that, given props, returns an object of event callback props optionally curried with additional arguments.
This package allows you to pass event callback props to a rendered DOM element without the risk of applying any invalid props that could cause unwanted side effects.
npm install make-event-props or yarn add make-event-props.import makeEventProps from 'make-event-props'.get eventProps() {
return makeEventProps(this.props, () => this.state.pdf);
}
render() {
return (
<div {...this.eventProps} />
);
}
The MIT License.
|
Wojciech Maj kontakt@wojtekmaj.pl http://wojtekmaj.pl |