Jotai and Atomic State Management
Learn the atomic state model, where state is composed from small independent units rather than one large store or tree.
Jotai takes an 'atomic' approach to state management, inspired partly by Recoil: instead of one large store object or a single Context value, you define many small, independent units of state called atoms, each created with atom(initialValue). Components subscribe to exactly the atoms they need via useAtom, and only those specific atoms' subscribers re-render when that atom's value changes.
Atomic state is like a spreadsheet: each cell (atom) holds its own value or formula referencing other cells (derived atoms), and changing one cell only recalculates and re-displays the cells that actually depend on it, rather than re-rendering the entire spreadsheet from scratch on any single edit.