伙计们,我在调试最近在我的应用程序中遇到的错误时遇到了麻烦,即“createStore 的 preloadedState 参数具有意外类型的 Null.Expected 参数是具有填充键的对象:“登录””
这是导出组合减速器的减速器文件代码片段
import {Map, fromJS} from 'immutable';
import {combineReducers} from 'redux';
import { login } from '../modules/login/LoginReducer';
export default combineReducers({
login
});
Run Code Online (Sandbox Code Playgroud)
======================================
import {
AUTH_USER,
SET_ADMIN_PRIVILEGES,
AUTH_ERROR
} from './login.types';
const INITIAL_STATE = { errors: null, authenticated: false, admin_privileges: false };
export const login = (state = INITIAL_STATE, action) => {
switch(action.type) {
case AUTH_USER:
return { ...state, errors: null, authenticated: true };
case SET_ADMIN_PRIVILEGES:
return { ...state, admin_privileges: true …Run Code Online (Sandbox Code Playgroud)