Mark Erikson, a Redux maintainer, writes detailed posts on React rendering, Redux, state management, and JavaScript tooling.
Commenters recommend it as a source on Redux and React, with one saying they like how he writes and another citing his Context versus Redux explanation.
Note that when I say the "community" here, I don't necessarly mean you or people close to the project, but I rather refer to what I've been seeing here internally, when talking to people at meetups, twitter, etc.
In the early days, the average Redux user was someone who had been burnt by Backbone or Angular 1.x state management, was excited about the solution Redux provided, was curious about Redux's FP characteristic or more rarely might even have been an FP zealot. There was a lot of chat around that area, how to handle specific problems from that angle.
As time went on and it became very popular, the "community" (I use the term loosely, as there's no single entity representing "the community") grew, and the typical Redux user was very much the same as the average JS dev. Usually a OO background or familiar with more classical languages and patterns. Just want to get shit done and doesn't care about the Redux pattern's unique characteristic. Uses Redux because everyone else is, not because they see value in the event sourcing-like decoupling.
A lot of things come from that. Like already mentioned, the focus came a lot more to "how to I reduce boilerplate", "waah I dont like passing props down", "code reuse!", "how do I make things look like my familiar OOP patterns".
That's all valuable and I don't want to downplay it (there's only so much nuance I can put in a stack overflow post), but a lot of this is available in other tools and other frameworks. MobX and state…
To be honest, I really haven't read up on Vue or Vuex at all, so I can't make any good comparisons.
I _can_ say that I'm currently working on a blog post that will discuss what actual technical limitations Redux requires (and where/why those limitations exist), vs how Redux is _intended_ to be used, vs how it's _possible_ to use Redux. I've been doing research for that post by reviewing many of the early Redux issues and discussions, and will be including some of that info in my post. Hoping to make progress on that post this weekend - if you're interested, keep an eye on my blog at http://blog.isquaredsoftware.com .
I did write a comment on Reddit yesterday where I pasted a quote of Redux's stated objectives from an early version of the README, which may be informative: https://www.reddit.com/r/javascript/comments/67gvic/i_just_dont_get_what_is_worth_the_extra/dgqbhmb/ .
In general, Dan and Andrew's primary goals were to enable time-travel debugging, server rendering, and state traceability, as well as offering up extension points so that developers could customize things like async behavior for their own preferences. That led to the effective requirements of immutable data handling, composed functions for organizing "write" logic, and the creation of "middleware" as the preferred approach for implementing async handling.
> The Backbone code is brutally honest about what it's doing. An event fires, a handler runs, you build some HTML, you put it in the DOM. It's verbose, sure, but there's no mystery. A junior developer can trace exactly what happens and when. The mental model is straightforward: "when this happens, do this." > The React code hides a lot. And once you move past simple examples, you hit problems that don't make sense until you understand React's internals. I relate to this a lot. I have had to read these two very large articles multiple times to calcify my mental model for understanding exactly _when_ react does something and _why_ it did or did not. https://overreacted.io/a-complete-guide-to-useeffect/ https://blog.isquaredsoftware.com/2020/05/blogged-answers-a-... Backbone was also my first framework that I haven’t touched in over 10 years, but looking at the code examples from the article I completely understood what was going on.
I just read through your post on servers[1], as I'm currently in a similar boat (webdev working with C++ devs). I think the biggest hurdle for such developers are things like:
- statelessness of the server (REST)
- the lifecycle of a single request
- the lifecycle of a single (server-)app (microframweworks)
OOP devs unfamiliar with server development tend to pollute the app lifecycle with hidden state in some singletons that are swirling around globally. The requirement that servers should be able to parallelize request-processing is mostly an afterthought and hidden app state makes it impossible to parallelize anything.
A sequence diagram of a single request would help there a lot IMHO and a short explanation of how to keep the response times short, by doing long-running tasks in the background with message queues.
[1]: https://blog.isquaredsoftware.com/2020/11/how-web-apps-work-http-server/
The main point is here: https://blog.isquaredsoftware.com/2021/01/context-redux-differences/#context-and-usereducer
Context updates all components while Redux and similar state management tools, because they live outside of React, do not. That's the main reason to use true state management tools over context. If you have a relatively small application or you don't care about that, continue using context. The article is also by a Redux core maintainer so you might call that biased but they know what they're talking about, since they're privy to React design decisions much more than regular users.
No, there is optimization happening at Redux level to ensure components only gets updated when they need to, but it's up to you to ensure your store is properly designed and consumed to avoid unnecessary updates.
Look up Mark Erikson's blog[1], who's a Redux maintainer, for a lot of details on Redux's internals (acemarke on HN), he also answers tons of questions everywhere[2] about Redux, he helped me so much understand it!
[1] https://blog.isquaredsoftware.com/
[2] https://stackoverflow.com/a/40386189