You forgot to talk about Redux Toolkit Query / RTK Query. Its a data fetching and caching library that works seamlessly with Redux toolkit. Its basically Redux's answer to React Query. Super useful if you don't want to break out of Redux's patterns while also not having to worry about doing the heavy lifting of caching your own data.
Zustand all the way baby. Gotta go fast!
Many times you want the state on the server, which makes react-query a better solution. In your user example the leaf components would send a mutation to the server, and the updates would be handled by react-query's caching mechanisms. But looks cool :)
just watched like 4 straight videos from you and i'm pretty sure my neck hurts from continuous nodding in agreement. you always have great takes
Wow. I wasn't aware that Redux had resolved so much. I was firmly stuck in seeing it implemented in a project around 2017 or so I think. It seemed incredibly boilerplatey as you say, and complex. I will look back into it again.
Great insight, I used and taught both Redux and Redux Toolkit, I still feel like for beginners, It’s bit confusing but I always start with the importance of keeping one source for truth in you app and I show them examples of how bad things can go if you don’t have that. I feel like people want understand WHY, Why is it so boilerplaty!
sure, context doesn't replace redux, but what about context + useReducer?
Many people finds react-query with zustand or jotai a good replacement of redux.Yes redux is hard to setup but as your app grows , the structure of redux will make testing a lot easier
Sounds like modern React's-redux and Vue's-Pinia are pretty much drinking from the same special sauce..
I'm using Redux Toolkit in my React Native app, it was a bit clunky to get set up and used to but I'm happy with it and it's modularity so far.
Love the thumbnail lol, amazing vid, thanks as always Matt
Very good as always. Btw I appreciate your care about content warning at 03:07.
Omg, someone said the same things I've been saying this whole time!
Thank you so much for this video. That’s true a lot of things are said around redux but your explanations and point of view are very helpful. Great video, as usual!!!
Great channel and how clam your explaining me great 👍
Is Redux still relevant in 2023? No. Unless you have a huge app with a lot of client side state like a video editor app, ui design app like figma, etc. In 2023 and beyond just use React Query for all your async server state and React Context or Zustand for the little global state that is left. Redux should be only be considered on VERY specific cases.
I feel like people who vehemently hate on redux at every opportunity only used the old crap syntax (with mapStateToProps and mapDispatchToProps), the new hook solution is much nicer to work with
I don't even use any other libraries. 👀 I just use React Context + React Query. And these cover almost everything I've ever had to do in my projects. Would wanna know if this isn't the best practice. Why is context never mentioned when talking about state management? Is it not good or there's something else?
These explanation diagrams look really neat. Which tool is used to create them ?
@XxXgabbO95XxX