How to use React useReducer hook like a pro - Pierre Ouannes
The React useReducer hook is another way to manage state in components. But do you know when to use it vs useState, and how? We'll learn that (and more) in this article.
Cool. I learned a few things
Glad you've liked it!
Great job. Keep going!
An Fyi, the fact that you need to know so much about how to manage state in React, just shows how pathetic React is at handling state.
Managing state is a hard issue in any sufficiently large and complex software.
This is correct. So many different architectures in other languages as well. I'm working on a Flutter app and it's the same thing. It doesn't mean that React specifically is bad at handling state, any software needs state management.
Let me put this bluntly: in React, it's pretty insane to have non trivial state. If you have a large and complex software + React, that will make it probably 5-10x more complex than it should be.
Do you have examples of other frameworks or libraries where you consider that managing state is 5-10x simpler than in React?
Any language that is not JS.
Haven't tried Vue/Angular, but I'm almost certain they handle it better.
This comment was deleted a month ago.