From e9d0ea9781adccb970a8d5914cfc27dfb415850b Mon Sep 17 00:00:00 2001 From: Martin Sosic Date: Tue, 4 Feb 2020 18:14:44 +0100 Subject: [PATCH] Replaced redux-starter-kit with @reduxjs/toolkit. --- data/Generator/templates/react-app/package.json | 2 +- data/Generator/templates/react-app/src/store/index.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/data/Generator/templates/react-app/package.json b/data/Generator/templates/react-app/package.json index eaff77b51..3819220e1 100644 --- a/data/Generator/templates/react-app/package.json +++ b/data/Generator/templates/react-app/package.json @@ -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": { diff --git a/data/Generator/templates/react-app/src/store/index.js b/data/Generator/templates/react-app/src/store/index.js index a000f34a5..d0c1f775b 100644 --- a/data/Generator/templates/react-app/src/store/index.js +++ b/data/Generator/templates/react-app/src/store/index.js @@ -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,