-
Notifications
You must be signed in to change notification settings - Fork 184
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 transition dom #78
Conversation
BTW - As mentioned in doug-wade#2: Still need to deal with root container/element attribute differences, but probably should fix #73 first. |
Added some commentary to explain the DOM re-use strategy and hopefully help ease review here. |
`div[${REACT_SERVER_DATA_ATTRIBUTE}="${index}"]` | ||
); | ||
var oldRootContainer = document.querySelector( | ||
`div[${PAGE_CONTAINER_NODE_ID}="${index}"]` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code style nit: defining these vars
inside the if-statement with intent to use them outside. Works in JS, but is not what I would call expected. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pulled the declarations out next to the one for mountNode
.
LGTM 👍 (with the exception of the vars-inside-if-block thing I left a comment on) |
Taking over responsibility for getting @doug-wade's awesome DOM preservation changes shepherded into master, since he's getting pulled in three different directions in his day job.
This is #70 with a few patches to get things working in some cases that didn't come up during the hackathon that spawned it.