Replaced redux-starter-kit with @reduxjs/toolkit.

This commit is contained in:
Martin Sosic 2020-02-04 18:14:44 +01:00 committed by Martin Šošić
parent 61e7789423
commit e9d0ea9781
2 changed files with 5 additions and 5 deletions

View File

@ -5,6 +5,7 @@
"private": true,
"dependencies": {
"@material-ui/core": "^4.9.1",
"@reduxjs/toolkit": "^1.2.3",
"lodash": "^4.17.15",
"react": "^16.12.0",
"react-dom": "^16.12.0",
@ -12,7 +13,6 @@
"react-router-dom": "^5.1.2",
"react-scripts": "3.3.1",
"redux": "^4.0.5",
"redux-starter-kit": "^0.5.1",
"uuid": "^3.4.0"
},
"scripts": {

View File

@ -1,5 +1,5 @@
{{={= =}=}}
import * as reduxStarterKit from 'redux-starter-kit'
import * as RTK from '@reduxjs/toolkit'
import loggerMiddleware from './middleware/logger'
@ -10,13 +10,13 @@ import loggerMiddleware from './middleware/logger'
*/
export const configureStore = (reducer, preloadedState) => {
const middleware = [
loggerMiddleware,
...reduxStarterKit.getDefaultMiddleware()
...RTK.getDefaultMiddleware(),
loggerMiddleware
]
const enhancers = []
const store = reduxStarterKit.configureStore({
const store = RTK.configureStore({
reducer,
preloadedState,
middleware,