-
Notifications
You must be signed in to change notification settings - Fork 48
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
Client side must use render provided by this library #8
Comments
@Sinewyk During server-side rendering React generates checksum (hash) for rendered markup. If it matches during client-side rendering, React will reuse server-generated DOM and just attach events to it. If it doesn't, React will throw away all the server-generated DOM and render the "proper" client-side DOM again. By default React takes this checksum from the root element's attribute |
So, theoretically we could do a one liner to attach it manually and use the standard |
@Sinewyk This is exactly what |
For once, I should have looked at the client side implementation first before opening my mouth. Sorry about that 😊 |
@Sinewyk Np) |
Thanks for the discussion on this, @Sinewyk & @th0r! (It was especially cool to have an issue opened, discussed, and closed all while I was asleep!) One thing to add: I'm strongly considering getting rid of the client side part of Just so you know, and so I get it written down: the basic idea would be for
Step 2 is necessary because React will get wonky and have errors in I'm not 100% sure how modern browsers will react to a JavaScript inline block that removes itself from the DOM before onDomReady. I know that IE6 and IE7 used to error out if you modified a node that had not yet been closed, but that was fixed for IE8. tl;dr: it will require a lot of testing, but there's a chance that in the future you will be able to just use vanilla |
FYI, I just released version 0.2.0, which allows you to use React's client-side |
Any reason for this ? The markup generation strategy should have no impact on its reuse once client side code is being executed no ?
The text was updated successfully, but these errors were encountered: