JaRoMaster
JaRoMaster

Reputation: 181

Do I need redux if I use redux-toolkit?

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?

Upvotes: 0

Views: 1102

Answers (2)

markerikson
markerikson

Reputation: 67469

Yes, part of the point of Redux Toolkit is that it already includes the redux core package automatically. So, you don't have to list redux in your package.json - just @reduxjs/toolkit.

Upvotes: 1

remonke
remonke

Reputation: 356

@reduxjs/toolkit uses redux as a dependency package, so it has be installed, but don't use it in your code

https://www.npmjs.com/package/@reduxjs/toolkit?activeTab=dependencies

Upvotes: 2

Related Questions