DEV Community

Evan Sutherland
Evan Sutherland

Posted on

Is mitt dead? 🥊

Mitt was first released 7 years ago. Today, it has open issues going back to 2021, issues waiting to be triaged, open PRs completely ignored, and no commits since mid 2023. Are the issues not worth doing? Is the library just avoiding exceeding it's 200 byte "microscopic" constraint? Maybe the author is busy with new projects and is waiting on new contributors? It's hard to say, but it makes me wonder if it's just dead.

What is a meaningful aim for a project like this?

Mitt is clearly still successful. It's easily one of the most popular Typescript event emitter libraries coming up on ~7M downloads on npm. Having an audience makes it easy to assume it's good as is, but would it be even more popular if it were more actively maintained? Or would feature bloat kill it entirely? Does keeping that 200 byte zip size actually matter?

Here's the past 5 years of downloads according to npm.
Growth on npm

Despite a flat-lined commit history.
Decline of commits

When does it make sense to stop?

Is it normal for projects to just stop? With the pace of change, especially as it relates to Typescript, if you're not changing it must mean you're dying. Is an event emitter just so simple that it can actually be "done"?

Taking it personally

In our case we needed a once function. It's clear that mitt is not interested in adding this feature any time soon. The implication was that this is a problem for users to solve, though we couldn't get the types to pass. So we built our own

Kitbag Events

https://events.kitbag.dev/

  • Type safe events and payload
  • Api includes on, off, once, emit, and clear
  • Support global Handlers
  • Supports broadcast channel

Kitbag Logo

Kitbag Events is a fresh take on an old concept. Like Mitt it's tiny with zero dependencies, though not trying to be "microscopic". My bet is that developers would prefer a modern library that's actively maintained, even it it comes with some extra bytes. Come check it out, drop a star ⭐️, and let us know if this was a good bet.

Happy engineering!

Top comments (0)