Do we need state management libraries anymore?

This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).

A deep dive into whether state management libraries are still necessary in modern React apps. The post categorizes state into UI, server, URL, global, and complex shared client state, then explores how Redux, Zustand, Jotai, MobX, and Valtio work under the hood — all converging on React 18's useSyncExternalStore hook. The author then builds a minimal Zustand-like store from scratch (~50 lines), demonstrating how to handle selectors, stale closures, tearing, and infinite loops. The conclusion: for most apps, TanStack Query, URL state, useState, and a small custom store are sufficient; full libraries still earn their place only for complex collaborative or design-tool-level client state.

26m read timeFrom neciudan.dev
Post cover image
Table of contents
The OG: Redux 🔗Zustand 🔗Jotai 🔗MobX 🔗Valtio 🔗Every road leads to useSyncExternalStore 🔗Putting on the builder hat 🔗useSyncExternalStore fixes all three 🔗The infinite loop 🔗So, do we need them? 🔗References 🔗
8K Impressions1 Comment