Master
Languages & Frameworks

Jotai and Zustand

Published: Apr 13, 2021
Apr 2021
Assess?

In the previous Radar, we commented on the beginning of a phase of experimentation with state management in React applications. We moved Redux back into the Trial ring, documenting that it is no longer our default choice, and we mentioned Facebook's Recoil. In this volume we want to highlight Jotai and Zustand: Both are state management libraries for React; both aim to be small and simple to use; and, perhaps not by complete coincidence, both names are translations of the word state into Japanese and German, respectively. Beyond these similarities, however, they differ in their design. Jotai's design is closer to that of Recoil in that state consists of atoms stored within the React component tree, whereas Zustand stores the state outside of React in a single state object, much like the approach taken by Redux. The authors of Jotai provide a helpful checklist to decide when to use which.