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

React 15 support - "attempted to reuse markup" #252

Closed
wub opened this Issue Apr 12, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@wub
Copy link

wub commented Apr 12, 2016

https://facebook.github.io/react/blog/2016/04/07/react-v15.html

React 15 changed the way components are rendered (regarding react-id etc), which causes this error for me when using @Html.React:

Warning: 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:
 (client) <div data-reactroot="" data-reactid
 (server) <div data-reactid=".1hrhaz20mio"

When I downgrade to React 0.14.x, this is resolved.

@Daniel15

This comment has been minimized.

Copy link
Member

Daniel15 commented Apr 12, 2016

Yes, ReactJS.NET doesn't use React 15 yet. I'll update it shortly.

Sent from my phone.
On Apr 11, 2016 7:01 PM, "Jarrod Mosen" notifications@github.com wrote:

https://facebook.github.io/react/blog/2016/04/07/react-v15.html

React 15 changed the way components are rendered (regarding react-id
etc), which causes this error for me when using @Html.React:

Warning: 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:
(client) <div data-reactroot="" data-reactid
(server) <div data-reactid=".1hrhaz20mio"

When I downgrade to React 0.14.x, this is resolved.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#252

@rnjailamba

This comment has been minimized.

Copy link

rnjailamba commented May 2, 2016

Thanks for this , it solved my issue.

@dgpedro

This comment has been minimized.

Copy link

dgpedro commented Nov 8, 2016

I got a question... If react 15 no longer needs the attribute data-reactid, why react.net keeps rendering elements with this attribute?

So far I was using Html.React( ... , serverOnly: true ) so the server renders nice and clean html without any of these attributes, but now I got confused if I'm doing it properly and I'm not taking advantage of server rendering at all by doing it this way!?

Could someone please clarify?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment