Skip to content

Commit

Permalink
chore: Upgrades redux (#595)
Browse files Browse the repository at this point in the history
* chore: upgrades Redux

* fix: review adjustments
  • Loading branch information
tuliomir authored May 2, 2024
1 parent a968e67 commit d69f11d
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 4 deletions.
52 changes: 51 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"dependencies": {
"@hathor/wallet-lib": "1.0.4",
"@ledgerhq/hw-transport-node-hid": "6.28.1",
"@reduxjs/toolkit": "2.2.3",
"@sentry/electron": "3.0.7",
"babel-polyfill": "6.26.0",
"bootstrap": "4.6.1",
Expand All @@ -51,7 +52,6 @@
"react-redux": "7.2.8",
"react-router-dom": "^6.22.3",
"react-scripts": "4.0.3",
"redux": "4.2.0",
"redux-saga": "1.2.1",
"redux-thunk": "2.4.1",
"ttag": "1.8.6",
Expand Down
7 changes: 5 additions & 2 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import { createStore, applyMiddleware } from "redux";
import { configureStore } from '@reduxjs/toolkit';
import thunk from 'redux-thunk';
import createSagaMiddleware from 'redux-saga';
import rootReducer from '../reducers/index';
Expand All @@ -15,7 +15,10 @@ import rootSagas from '../sagas';
const saga = createSagaMiddleware();
const middlewares = [saga, thunk];

const store = createStore(rootReducer, applyMiddleware(...middlewares));
const store = configureStore({
reducer: rootReducer,
middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(middlewares)
});

saga.run(rootSagas);

Expand Down

0 comments on commit d69f11d

Please sign in to comment.