Package Exports
- make-event-props
- make-event-props/dist/cjs/index.js
- make-event-props/dist/esm/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (make-event-props) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Make-Event-Props
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.
tl;dr
- Install by executing
npm install make-event-props
oryarn add make-event-props
. - Import by adding
import makeEventProps from 'make-event-props'
. - Create your event props object:
get eventProps() { return makeEventProps(this.props, (eventName) => additionalArgs); }
- Use your event props:
render() { return ( <div {...this.eventProps} /> ); }
License
The MIT License.
Author
![]() |
Wojciech Maj kontakt@wojtekmaj.pl https://wojtekmaj.pl |