# make-event-props

> Returns an object with on-event callback props curried with provided args.

Latest version **2.0.0** (published 2025-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install make-event-props
pnpm add make-event-props
yarn add make-event-props
bun add make-event-props
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2025-03-22 |
| First published | 2018-05-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 31.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 9 |
| Author | Wojciech Maj |
| Maintainers | wojtekmaj |
| Keywords | react, event, event props |

## Links

- npm: https://www.npmjs.com/package/make-event-props
- Repository: https://github.com/wojtekmaj/make-event-props
- Homepage: https://github.com/wojtekmaj/make-event-props#readme
- Issues: https://github.com/wojtekmaj/make-event-props/issues
- Funding: https://github.com/wojtekmaj/make-event-props?sponsor=1
- npm.io page: https://npm.io/package/make-event-props

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2025-03-22
- 1.6.2 — 2023-10-18
- 1.6.1 — 2023-05-29
- 1.6.0 — 2023-05-29
- 1.5.0 — 2023-04-18
- 1.4.4 — 2023-04-18
- 1.4.3 — 2023-04-18
- 1.4.2 — 2023-02-03
- 1.4.1 — 2023-02-03
- 1.4.0 — 2023-02-03
- 1.3.0 — 2021-09-27
- 1.2.0 — 2018-12-24
- 1.1.0 — 2018-09-19
- 1.0.0 — 2018-05-04

## README

[![npm](https://img.shields.io/npm/v/make-event-props.svg)](https://www.npmjs.com/package/make-event-props) ![downloads](https://img.shields.io/npm/dt/make-event-props.svg) [![CI](https://github.com/wojtekmaj/make-event-props/actions/workflows/ci.yml/badge.svg)](https://github.com/wojtekmaj/make-event-props/actions)

# 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` or `yarn add make-event-props`.
- Import by adding `import makeEventProps from 'make-event-props'`.
- Create your event props object:
  ```ts
  const eventProps = useMemo(
    () => makeEventProps(props, (eventName) => additionalArgs),
    [additionalArgs],
  );
  ```
- Use your event props:
  ```tsx
  return <div {...eventProps} />;
  ```

## License

The MIT License.

## Author

<table>
  <tr>
    <td >
      <img src="https://avatars.githubusercontent.com/u/5426427?v=4&s=128" width="64" height="64" alt="Wojciech Maj">
    </td>
    <td>
      <a href="https://github.com/wojtekmaj">Wojciech Maj</a>
    </td>
  </tr>
</table>

---
_Source: https://npm.io/package/make-event-props · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
