I'm doing the react tutorial by Nodeschool, the module titled learnyoureact
.
I'm on the Isomorphic
lesson (8 of 11) and I'm running into the warning:
warning.js:44Warning: React attempted to reuse markup in a container but the checksum was invalid.
This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting.
React injected new markup to compensate which works but you have lost many of the benefits of server rendering.
Instead, figure out why the markup being generated is different on the client or server:
My solution is the same as this one and I have even tried to copy and paste from this solution but I'm still getting the same warning. To recreate the problem, copy the code from above repo.
What does it all mean? I looked at some SO posts about this such as this and this but I don't think the solution pertains to my problem/warning. As a React novice, I'm baffled at what to do next. The HTML page looks fine but the learnyoureact
module says different HTML is generated and I can see that as well in Chrome's inspect tool.
I have figured out that the issue stems from this line.
ReactDOM.render(<TodoBox data={data} />, document.getElementById("app"));
How can I fix this problem/warning? Thank you!
Here's a picture of error trace:
This is what I see now. The warning mysteriously disappeared after I left and re-ran node program.js
a few hours later but in my terminal, I still get same erroneous HTML. Any ideas?