mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-26 10:35:04 +03:00
Replaced redux-starter-kit with @reduxjs/toolkit.
This commit is contained in:
parent
61e7789423
commit
e9d0ea9781
@ -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": {
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user