-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[State Magement] Include setState + new context API #4
Comments
great work btw! :) I can create a PR if you want |
Thanks for adding this issue with your thoughts :)
Regarding the context API, to be honest I don't agree that is necessary to understand it before learning Redux or Mobx. It's very helpful to know this mechanism, it explains a lot of things that happen "under the hood". But the knowledge that redux's |
I didn't mean that the context API is required to understand redux / mobx, and I agree with you it's not necessary. Looking at the graphic someone may incorrectly think you require a library to handle state management, specially if you're talking about learning material. In my opinion you can introduce the concept of state management (local state vs global state, lifting state up, etc) only using React's API. After that you can explain which problems redux and mobx try to solve. Passing state through different levels of the tree can be explained using the new context API. |
Maybe it's a matter of taste, but I try to avoid introducing libraries, which include more complexity and new problems. Of course there is always a tradeoff, but you need to fully understand the underlying problem (or limitation) the library is trying to solve to decide if it's worth it. |
Yeah, I agree with you. There is no need to learn any additional libraries to manage React's state. So what's your suggestion? Should I add an additional block next to |
Yes, i think it's only a clarification |
I think it's important to fully understand setState and new context API before learning a more complex solution like redux or mobX.
It usually covers most of the state management requirements and let's you understand what problems those tool help you with.
The text was updated successfully, but these errors were encountered: