https://github.com/btomashvili/react-redux-firebase-boilerplate
每次我按照在localhost:3000上运行的安装说明作为空白屏幕时,是否有人可以告诉我如何运行此应用程序?谢谢 !
在控制台中发现这些错误也会非常感谢任何帮助!!!
Error: Given action "FETCH_FIREBASE_USER", reducer "currentUser" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.
at combination (combineReducers.js:136)
at dispatch (createStore.js:178)
at redux-logger.js:1
at index.js:28
at Object.fetchUser (bindActionCreators.js:7)
at new App (app.jsx:15)
at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:148)
at ReactCompositeComponentWrapper.wrapper [as mountComponent] (ReactPerf.js:66)
at Object.mountComponent (ReactReconciler.js:37)
at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:225)
Uncaught Error: Given action "FETCH_FIREBASE_USER", reducer "currentUser" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.
at combination (combineReducers.js:136)
at dispatch (createStore.js:178)
at redux-logger.js:1
at index.js:28
at Object.fetchUser (bindActionCreators.js:7)
at new App (app.jsx:15)
at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:148)
at ReactCompositeComponentWrapper.wrapper [as mountComponent] (ReactPerf.js:66)
at Object.mountComponent (ReactReconciler.js:37)
at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:225)
答案 0 :(得分:0)
非常明显。因为它无法根据操作FETCH_FIREBASE_USER
返回状态。在快速解决方案中,只需返回state
case FETCH_FIREBASE_USER:
return state;
// return fetchUser(); Comment this out
当您从FIREBASE
服务进行适当的设置时。再次回到那条线。