Persistent state in React and Next.js, without a store
localStorage plus useState looks like six lines of code — until SSR, tabs, stale data and corrupt JSON show up. What production-grade persistence in React actually takes, and the 1.4 kB shortcut.
react · nextjs · state