Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nextRootReducer is undefined #100

Open
kevzettler opened this issue May 27, 2016 · 3 comments
Open

nextRootReducer is undefined #100

kevzettler opened this issue May 27, 2016 · 3 comments

Comments

@kevzettler
Copy link

What is nextRootReducer supposed to be here?

https://github.com/luandro/hapi-universal-redux/blob/master/src/store.js#L17

@luandro
Copy link
Owner

luandro commented May 31, 2016

You're getting undefined?

Here's where I got that from:

https://stackoverflow.com/questions/34243684/make-redux-reducers-and-other-non-components-hot-loadable

@ttlnow
Copy link

ttlnow commented Jul 28, 2016

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. :-)

@luandro
Copy link
Owner

luandro commented Jul 28, 2016

Updated according to the answer in Stackoverflow, but the functionality didn't change at all... Is there a bug somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants