index.js 331 B

12345678910111213141516171819
  1. import { configureStore } from '@reduxjs/toolkit';
  2. import userReducer from './slices/user-silce';
  3. // const reducer = (state, action) => {
  4. // return {
  5. // user: {
  6. // name: '郭郭',
  7. // },
  8. // };
  9. // };
  10. const store = configureStore({
  11. reducer: {
  12. user: userReducer,
  13. },
  14. // reducer,
  15. });
  16. export default store;