Redux store does not have a valid reducer
Your import
statement is incorrect. Either you use import { Foo } from 'bar'
together with export Foo
, or use import Foo from 'bar'
if you export with export default Foo
.
In other words, change either export default function FriendListReducer
to export function FriendListReducer
, or change the import statement from import { FriendListReducer }
to import FriendListReducer
.
../reducers/reducers ? it's a strange naming
Anyway, it seems ../reducers/reducers doesn't return a reducer, if reducers is a directory, put a index.js inside, import each reducer and create a root reducer
import FriendListReducer from "./FriendListReducer"const rootReducer = combineReducers({ friendList : FriendListReducer})export default rootReducer
Important!! you will have state.friendList in your state.
I hope it will help