Do we need state management libraries anymore?
Recently, I recorded a Seniors at Scale episode with Dan Abramov, creator of Readux (I will link it here once it's published), and mid-conversation, he told me that state management libraries are no longer necessary.
I was shocked or flabbergasted (I finally got to use this word).
But after thinking about it for a bit, it kinda makes sense.
We needed State Management libraries to avoid multiple re-renders that occur with Context, but we actually want to be more precise about how we handle our State.
I wrote about this before in my component communication patterns article, that there are different types of state.
UI state is local. A modal being open, a dropdown selection, an input value. useState handles this.
Server state is a cached copy of data that lives on a backend. It goes st…