Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Value is Undefined in SSR of React-Redux v6 #1107
There is an issue that I found in regarding to React Redux v6 on SSR, it might be related to the new Context.Consumer API.
I am currently getting an error in the terminal that states
However when I turn off SSR, the app works fine with no issue. So this issue is only on the server side rendering. I also dug into the new version 6 code and when I console.log Context that is being passed into the Connect class of connectAdvanced it logs
which contains the store and store state, however the issue is when it is being consumed by the Consumer
value is being undefined in this.renderWrappedComponent.
The expected behavior is that value should contain store and storeState from the store in Consumer on the server side, similar to the behavior of client side.
The version of redux is 4.0.1 and react-redux 6.0.0, Mac OS. This was not an issue in the previous version of react-redux 5.1.1 since it was using the old context API.