@zibuthe7j11/nulla-numquam-quos

1.0.0 • Public • Published

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 @zibuthe7j11/nulla-numquam-quos or yarn add @zibuthe7j11/nulla-numquam-quos.
  • Import by adding import makeEventProps from '@zibuthe7j11/nulla-numquam-quos'.
  • 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

Wojciech Maj Wojciech Maj

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @zibuthe7j11/nulla-numquam-quos

    Weekly Downloads

    11

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    6.56 kB

    Total Files

    10

    Last publish

    Collaborators

    • vnhat562