
We Use Valtio Instead of Redux. Nobody Regrets It.
For updating a counter, Redux requires you to set up a store, reducers, actions, selectors, and maybe middleware. Valtio needs three lines of code. We replaced the entirety of our frontend state management with Valtio at a 15-person startup. That was a year and a half ago. Not a single person has asked to go back. Here's our experience. The Ceremony Problem It wasn't that there's anything inherently wrong with Redux. It works fine. It's just a lot of ceremony. Every new feature means a new slice, new action types, potentially new selectors if you like those. Our codebase had more Redux wiring than logic in some files. For a small team trying to move fast, this isn't a tradeoff, it's a tax. Why Valtio Someone mentioned Zustand. I'd seen Jotai too. They both look great. But when I read through the Valtio docs, I couldn't believe what I was looking at. You create a proxy object. You mutate the proxy object directly because it represents your state. Components that use the state automatica
Continue reading on Dev.to
Opens in a new tab



