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.
- Install by executing
npm install @rtyughnnpm/placeat-enim-consequatur
oryarn add @rtyughnnpm/placeat-enim-consequatur
. - Import by adding
import makeEventProps from '@rtyughnnpm/placeat-enim-consequatur'
. - Create your event props object:
const eventProps = useMemo( () => makeEventProps(props, (eventName) => additionalArgs), [additionalArgs], );
- Use your event props:
return <div {...eventProps} />;
The MIT License.
Wojciech Maj |