1.0.0 • Published 18 days ago

@wemnyelezxnpm/eos-ipsum-labore v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
18 days ago

npm downloads CI

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 @wemnyelezxnpm/eos-ipsum-labore or yarn add @wemnyelezxnpm/eos-ipsum-labore.
  • Import by adding import makeEventProps from '@wemnyelezxnpm/eos-ipsum-labore'.
  • Create your event props object:
    const eventProps = useMemo(
      () => makeEventProps(props, (eventName) => additionalArgs),
      [additionalArgs],
    );
  • Use your event props:
    return <div {...eventProps} />;

License

The MIT License.

Author

1.0.0

18 days ago