first
This commit is contained in:
19
src/store/index.js
Normal file
19
src/store/index.js
Normal file
@@ -0,0 +1,19 @@
|
||||
// third-party
|
||||
import { configureStore } from '@reduxjs/toolkit';
|
||||
import { useDispatch as useAppDispatch, useSelector as useAppSelector } from 'react-redux';
|
||||
|
||||
// project import
|
||||
import reducers from './reducers';
|
||||
|
||||
// ==============================|| REDUX TOOLKIT - MAIN STORE ||============================== //
|
||||
|
||||
const store = configureStore({
|
||||
reducer: reducers
|
||||
});
|
||||
|
||||
const { dispatch } = store;
|
||||
|
||||
const useDispatch = () => useAppDispatch();
|
||||
const useSelector = useAppSelector;
|
||||
|
||||
export { store, dispatch, useSelector, useDispatch };
|
||||
Reference in New Issue
Block a user