Background
We were approached by a client to take over a React.js project built back in 2019. Along with delivering new features, we also wanted to improve the project’s foundation by applying better practices and modern strategies.
One of the first upgrades we had in mind was using Zustand for global state management. That’s when we ran into our first challenge.
The Challenge
Since the project was running on an older version of React, the latest release of Zustand simply wouldn’t work. We immediately ran into compatibility errors.
The straightforward answer was obvious: install a version of Zustand that matches the React version already in use. But actually figuring out which version would work turned out to be a hassle.
Manually checking version histories would take too much time.
AI tools suggested steps, but they still required digging through docs.
And because we needed to add a couple of other libraries too, repeating this process wasn’t practical.
What looked like a small setup task could easily eat up hours of effort.
The Solution
Instead of wasting time, we built a tool to handle this problem once and for all.
We created package-comp-check, an npm package that checks which version of a dependency is compatible with the React.js version in your project.
It’s installed globally and works with a single command. You point it to the library you want, and it tells you the right version to install.
No guesswork. No trial and error. And it’s not limited to Zustand — it works with any npm package.
The Impact
This small tool saved us a lot of time during the project. We were able to add Zustand and other libraries smoothly without wasting hours hunting through release notes.
The bigger win was realizing this isn’t just our problem — anyone working with legacy React projects runs into the same issue. So, we decided to publish it as an open-source package.
Now, both our team and the broader developer community can benefit from a quicker, cleaner way to handle package compatibility.
Key Takeaways
Legacy projects often need more than just new features — they need smarter processes.
Building small tools for specific problems can save time and frustration.
Sharing solutions with the community multiplies the impact beyond a single project.
Try the tool yourself: package-comp-check on npm