Menu

1 / 2

You Probably Don't Need Redux Yet

DEV Community·ReactChallenges·6 months ago
#Eqn1i729
#javascript#react#frontend#redux#state
Reading 0:00
15s threshold

When you start learning React, the list of things to cover feels endless: components, props, state, hooks, effects, routing. And somewhere in that list, usually right after you figure out useState , someone mentions Redux or Zustand. The implication is clear: if your app is going to be serious , you need a global state management library.

But here is the thing: you can skip it at first . Not because these libraries are bad — they aren't — but because most of the state in your app doesn't belong to them in the first place.

👉 Try it in practice: Shopping Cart

Most state is server state

Think about the data flowing through a typical app. A list of products, a user profile, search results, a dashboard with metrics. Where does it come from? An API. Where does it go when you update it? Back to the API.

This is server state — data you fetch, mutate, and cache, but that you don't own. Its source of truth lives on a server.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.