microsoft / redux-dynamic-modules

Modularize Redux by dynamically loading reducers and middlewares.
https://redux-dynamic-modules.js.org
MIT License
1.07k stars 116 forks source link

undefined state on first render after dynamicially loading module in react-redux v6 #131

Open sanchitbansal10 opened 4 years ago

sanchitbansal10 commented 4 years ago

This is an old issue and a fix was done for this. https://github.com/microsoft/redux-dynamic-modules/pull/59

I faced this while working with react-redux v6

Steps to reproduce...Run the Counter example in packages with react-redux v6..On first render you get an undefined state.

samratshaw commented 4 years ago

@sanchitbansal10 I am facing the same issue. Were you able to find a fix for this?

I am using v5.2.0

samratshaw commented 4 years ago

@abettadapur @navneet-g Any idea how to fix this?

sanchitbansal10 commented 4 years ago

@footyapps27 hey I had to upgrade my react-redux package.. I can try and raise a PR but no maintainer seems to be around

samratshaw commented 4 years ago

@sanchitbansal10 Which version of react-redux solved the issue for you?

sanchitbansal10 commented 4 years ago

v7

samratshaw commented 4 years ago

v7

That's weird. I am using v7 as well, but still getting undefined on the first load. :/

sanchitbansal10 commented 4 years ago

@footyapps27 You can try running this sample app https://github.com/microsoft/redux-dynamic-modules/tree/master/packages/counter-example

with v6 and v7...It doesn't return undefined for v7 Maybe something else is wrong