Do we need another state management solution?
Jack

Jack @jackmellis

About: Typescript and React nerd. I have a soft spot for architecture and unit testing

Location:
United Kingdom
Joined:
Dec 16, 2020

Do we need another state management solution?

Publish Date: Dec 31 '20
-1 1

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!

Comments 1 total

  • Dima
    DimaDec 31, 2020

    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

Add comment