Skip to content
Snippets Groups Projects
Commit 6cf7b931 authored by Ismail's avatar Ismail
Browse files

install thunk as a middleware for async calls from DB

parent 1587d913
No related branches found
No related tags found
No related merge requests found
......@@ -10765,6 +10765,11 @@
"symbol-observable": "^1.2.0"
}
},
"redux-thunk": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.3.0.tgz",
"integrity": "sha512-km6dclyFnmcvxhAcrQV2AkZmPQjzPDjgVlQtR0EQjxZPyJ0BnMf3in1ryuR8A2qU0HldVRfxYXbFSKlI3N7Slw=="
},
"regenerate": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.1.tgz",
......
......@@ -11,7 +11,8 @@
"react-redux": "^7.2.1",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.3",
"redux": "^4.0.5"
"redux": "^4.0.5",
"redux-thunk": "^2.3.0"
},
"scripts": {
"start": "react-scripts start",
......
......@@ -3,11 +3,12 @@ import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import { createStore } from 'redux';
import { createStore, applyMiddleware } from 'redux';
import authReducer from './store/reducers/authReducer';
import { Provider } from 'react-redux';
import thunk from 'redux-thunk';
const store = createStore(authReducer);
const store = createStore(authReducer, applyMiddleware(thunk));
ReactDOM.render(
<React.StrictMode>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment