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

Issue: Adding enhancer that depends on a reducer #58

Open
raRaRa opened this issue Feb 18, 2019 · 3 comments
Open

Issue: Adding enhancer that depends on a reducer #58

raRaRa opened this issue Feb 18, 2019 · 3 comments

Comments

@raRaRa
Copy link

raRaRa commented Feb 18, 2019

There are enhancers that depend on a reducer that adds to the state. I tried adding the Redux-first-router enhancer, but it throws an error that the state hasn't been set, because it's dependent on the Redux-first-router reducer.

The problem seems to be that redux-dynamic-modules adds the enhancer before adding the first/startup module. I'd like to be able to pass a reducer to the internal createStore with the RFR enhancer.

Is there a way to accomplish this?

Thanks.

@navneet-g
Copy link
Contributor

Can you try passing some initialState and see if it works?

@raRaRa
Copy link
Author

raRaRa commented Feb 24, 2019

Hey @navneet-g. I'm already passing some initial state and it fails, because it expects certain state from Redux First Router, e.g. the location/page I'm on, the query string etc. I can't fill some dummy values into the location state because that would make RFR think I'm on a wrong page.

@dbartholomae
Copy link

Just stumbled upon the exact same problem. I think this is solvable by allowing to add a reducer in the moduleStoreSettings.

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