I tried adding redux to my react-native project, but when using the createStore method of redux, VSCode told me that it was deprecated and I should use redux-toolkit instead. I added it to my project, but I wander if I can remus the redux
package now when I have the @reduxjs/toolkit
installed?
Question posted in React native
The official React Native documentation can be found here.
The official React Native documentation can be found here.
2
Answers
@reduxjs/toolkit
usesredux
as a dependency package, so it has be installed, but don’t use it in your codehttps://www.npmjs.com/package/@reduxjs/toolkit?activeTab=dependencies
Yes, part of the point of Redux Toolkit is that it already includes the
redux
core package automatically. So, you don’t have to listredux
in yourpackage.json
– just@reduxjs/toolkit
.