DEV Community

Discussion on: How to add Redux Toolkit to a React-Redux application ⚛️

 
phryneas profile image
Lenz Weber

I said multiple times, we are not going to remove it and using it is safe. We still consider it "legacy" in the sense that most users will probably never connect a new component again and over a longer time it's usage might fade away. We will keep it running but will probably never add any new feature to it.

As for context for state, I would advise against that: Context is a dependency injection mechanism meant for seldomly changing values - it is not meant for something like state (we tried that in react-redux 6 and performance was very bad) that might change a lot, especially since it does not support partial subscriptions. Give dev.to/javmurillo/react-context-al... a read.

Thread Thread
 
lexiebkm profile image
Alexander B.K. • Edited

Thanks for telling me about caveats of Context for using it as global state management. That is actually I have been wondering so far.
Now that I have found that you are an expert, who is a contributor of Redux Toolkit, I should take your advice.
I am still learning Redux with RTK, including RTK query as well as React-Redux. There are a lot of things to learn of these Redux technology that need time/patience to use it correctly, but I hope it will pay of in the long run for me.

Thread Thread
 
maxinejs profile image
Maxine

Thanks again for the awesome info! @phryneas

Thread Thread
 
maxinejs profile image
Maxine

I have dropped my use of connect since your initial comment, and it has made my life easier no doubt!