-
Notifications
You must be signed in to change notification settings - Fork 28.2k
Did not expect server HTML to contain a <span> in <div> using redux-saga #5367
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
Comments
I have a similar issue: Browser: Safari Version 12.0 (14606.1.36.1.9) |
Hi, @francisrod01 this warning is given by react. It is because your app is somehow initially rendering a different tree on the client vs the server. you can read about it here on stackoverflow. The warning is due to the call to the store.dispatch in getInitialProps. Somehow it results in two different nodes on server and client. due to this react identifies it as different node and could not compare it properly for updation. One solution I found is to set the initial store value for translation instead of an empty object. I forked and have set the initial value in this codesandbox. It resolves this warning. This issue is somewhat different but will help you understand better, |
@timneutkens this can be closed as the error is no longer shown in the the |
In my case it was because of using |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Examples bug report
Example name
with-redux-saga:
https://github.com/zeit/next.js/tree/canary/examples/with-redux-saga
Describe the bug
I receive the content from serve and show on the screen but the console shows a red warning with the exactly text rendered by redux.
To Reproduce
I have a real demo on CodeSandbox:
https://codesandbox.io/s/y16j84949
Expected behavior
I expect a correct rendering in server and client.
Screenshots
System information
The text was updated successfully, but these errors were encountered: