Zustand and Jotai are minimal state libraries that achieve global state with far less boilerplate than Redux, and with built-in selective subscriptions to avoid unnecessary re-renders. They take different mental models: Zustand is a single store; Jotai is atomic.
Zustand — a simple, hook-based store
{ create } ;
useStore = ( ({
: ,
: ( ({ : s. + })),
: ({ : }),
}));
() {
count = ( s.);
increment = ( s.);
;
}
