|
|
3 jaren geleden | |
|---|---|---|
| .. | ||
| dist | 3 jaren geleden | |
| src | 3 jaren geleden | |
| LICENSE | 3 jaren geleden | |
| README.md | 3 jaren geleden | |
| package.json | 3 jaren geleden | |
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 |