hapi-universal-redux
hapi-universal-redux copied to clipboard
nextRootReducer is undefined
What is nextRootReducer supposed to be here?
https://github.com/luandro/hapi-universal-redux/blob/master/src/store.js#L17
You're getting undefined?
Here's where I got that from:
luandro, I just saw this issue when I was converting hapi-universal-redux to use TypeScript... are you sure you've named the variable correctly here:
const {reducer: nextReducer} = require('./reducers/index');
store.replaceReducer(nextRootReducer);
TypeScript flagged nextRootReducer - when I looked at your stackoverflow reference the code shown was: const nextRootReducer = require('./reducers/index').default;
So it looks to me as if you've named it wrong? This is why I like TypeScript- it catches this type of thing while you're editing. :-)
Updated according to the answer in Stackoverflow, but the functionality didn't change at all... Is there a bug somewhere?