DEV Community

Jack
Jack

Posted on

Do we need another state management solution?

So I spent several years working with redux + rxjs. Honestly epics and streams add so much cognitive complexity that it hugely affected the learning curve for new starters.

We then completely scrapped redux in favour of react-query. I've used it in enterprise apps for a year and I loved it. But it still didn't quite do what I wanted. I've yet to find a situation where I want to arbitrarily refetch my data, or refetch on window focus. Maybe for a chat app or something with constantly changing data. I also wish it was lazier, and smaller, and had better refetching logic.

So recently I started playing with recoil. But what starts as a very react-ey api quickly becomes convoluted and hard to read. And I also couldn't get past the whole "selectors should be idempotent" while also showing me a selector that reads from a database!

I also started to play with relay but I quickly abandoned it as the api just felt really awkward to me.

So like every npm package ever, I think "well this does 70% of what I want it to do". And like half of every npm package ever, I think "maybe I'll try writing my own version!"

I started playing with a proof of concept, using it in personal projects, refining it, iterating on it, and I've actually reached a point where I genuinely enjoy using it more than other libraries.

What do I do now? Do I publish it? Should I bloat npm even further with something that is really quite similar to existing products? Can I compete with Facebook et al? Do I even want to? Does the world really need yet another state management solution?

That's not rhetorical, I'd genuinely like your thoughts on this!

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (1)

Collapse
 
zarabotaet profile image
Dima • Edited

do a careful search for a start in the npm. so I found an effector and have been using it for more than a year in production, although I also tried to write my own bike initially

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up