Re:React Common Tools and Practices: State Management Overview
by acemarke on Monday March 08, 2021 @10:54AM
(#26387004)
FWIW, I completely agree that people should focus on learning React itself first, and then pick up other libraries (like Redux) later, and we specifically make that recommendation in the Redux docs.
That's also the kind of advice I want to have in this new "Community Tools" resource site. At the same time, this site _is_ intended to list common tools in use in the ecosystem and when it _might_ make sense to use them.
Re:React Common Tools and Practices: State Management Overview
by ericwood on Monday March 08, 2021 @11:00AM
(#26387082)
This is more commentary on the "the best React state management setup for you is..." comment above than the site itself. I fundamentally take issue with there being a "best" solution for state management, especially targeted at people starting out. The various libraries can do great things for different apps, but the answers as to what works best for a given situation tend to be nuanced.
Re:React Common Tools and Practices: State Management Overview
by Chris_Newton on Monday March 08, 2021 @12:11PM
(#26388257)
There can’t be a universal best solution to state management. Sometimes your requirements are so simple that using a library is overkill and basic JS is fine. Sometimes your requirements are so complicated that well-known libraries like Redux and MobX aren’t enough, and if you’re going to implement something more comprehensive anyway then the extra dependency might not be helpful. In between, there is a scale where different strategies might work best. A site that helps less experienced developers to figure out where their needs fall on the spectrum and which strategies might work well for them seems like a helpful idea.
Re:React Common Tools and Practices: State Management Overview
by ericwood on Monday March 08, 2021 @12:27PM
(#26388527)
I agree, once again my original comment is in response to a comment on here that I'm replying to and not the linked article. I myself would find a lot of utility in a site that compares all the different approaches.
Re:React Common Tools and Practices: State Management Overview
by Chris_Newton on Monday March 08, 2021 @02:45PM
(#26390566)
I was commenting in support of your position. Sorry if that wasn’t clear!
Re:React Common Tools and Practices: State Management Overview
by IceHegel on Wednesday March 10, 2021 @10:45AM
(#26412411)
I take the point that "best" isn't completely objective, but it's also important for people with experience to help those learning the ecosystem. The state management players differ in philosophy and quality. I’m not sure Redux is abstractly the best state management pattern, but practically it’s a very high quality library with native-app quality tooling.
Re:React Common Tools and Practices: State Management Overview
by IceHegel on Wednesday March 10, 2021 @10:34AM
(#26412290)
Completely agree that anyone learning React should learn the built in patterns first. My point was that if your app is becoming meaningfully more complicated because you are working around the limits or useState and useContext, you should not hesitate to learn and use Redux, even in 2021.
Learning the built-in React features goes a longer way than specific state management libraries if you're starting out. I'm really wary of anyone selling a specific set of libraries as being the way for beginners to go, unless they're tackling apps that have very specific state management needs.