blob: 7689af5c00ee006448422d109506bf8f02071965 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import {configureStore, getDefaultMiddleware} from '@reduxjs/toolkit';
import reducer from './rootReducer';
/**
* The entry point to our store
* getDefaultMiddleware : This returns an array of default middlewares like Thunk (used for async calls)
*/
const store = configureStore({
reducer,
middleware: [...getDefaultMiddleware()],
});
/**
* The exports below come in handy when dispatching from a file outside of any of the Child component's
*/
export type AppDispatch = typeof store.dispatch;
export type GetState = typeof store.getState;
export default store;
|