安装完redux-immutable报错

来源:7-10 使用 redux-immutable 统一数据格式

不会我就学

2023-11-06

在这里输入代码

The slice reducer for key “header” returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don’t want to set a value for this reducer, you can use null instead of undefined.
at http://localhost:3000/static/js/bundle.js:44168:13
at Array.forEach ()
at assertReducerShape (http://localhost:3000/static/js/bundle.js:44162:25)
at combineReducers (http://localhost:3000/static/js/bundle.js:44217:5)
at ./src/store/reducer.js (http://localhost:3000/static/js/bundle.js:917:71)
at options.factory (http://localhost:3000/static/js/bundle.js:52785:31)
at webpack_require (http://localhost:3000/static/js/bundle.js:52230:33)
at fn (http://localhost:3000/static/js/bundle.js:52442:21)
at ./src/store/index.js (http://localhost:3000/static/js/bundle.js:852:66)
at options.factory (http://localhost:3000/static/js/bundle.js:52785:31)

写回答

1回答

Dell

2023-11-19

header 对应的 reducer是不是没有export 导出内容,你查一下

0
0

React零基础入门到实战,完成企业级项目简书网站开发

主流新技术 React-redux,React-router4,贯穿基础语法

5275 学习 · 2496 问题

查看课程