React State Feels Simple — Until It Doesn't
React state management often feels more complex than it needs to be.
Selectors, memoization, dependency arrays…
we spend a lot of time managing how state updates, not just what the state is.
Recently, I tried Valtio — and it made me rethink some of these patterns.
The usual problem
In many React setups, especially as apps grow, state logic tends to spread:
UI state and business state get mixed
we add selectors to control updates
we optimize re-renders manually
we introduce more abstraction to keep things under control
It works — but it requires constant orchestration.
What felt different with Valtio
Valtio takes a different approach based on proxies.
Instead of thinking in terms of update triggers and subscriptions, you work directly with state:
import { proxy } from ' valtio ' ;
const state = proxy ({ count : 0 });
function increment () { state .…