-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Framework: Add support for logged in isomorphic layout rendering #6312
Conversation
|
||
return props; | ||
}; | ||
} )(); |
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.
Candidate for lodash/once
?
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.
Candidate for
lodash/once
?
Yeah, I think once
would be a perfect fit here.
Great to see some interest and progress on this. Here's an earlier attempt of mine that has some discussion on issues we were running into at the time, some of which might have hopefully been resolved by React 15. |
Yeah, and those warnings tended to go hand in hand with actual rendering errors when we last tried such a thing with #5081. I was starting to get concerned we might only be able to switch over to single tree rendering in one big sweep across all sections, but I'd love to be proven wrong. We should pay particular attention to switching across different sections and groups with any PR that attempts such a thing tho. Litmus test is
Not yet. This is partly due to performance and caching concerns. Since we were wary about
Later on, yeah, but we might be able to do without for now. |
@aduth I've rebased and updated #5081, and I think it's a functional PoC (single-tree rendering logged-in |
Heh, certainly not offended. As I mentioned before, the changes here were simply remnants of an initial approach from an earlier PR, and nowhere near ready to be merged. I'll go ahead and close this in favor of yours. |
Related: #6311
Related: Isomorphic Routing
Note: This is in-progress and may not be mergeable in the near future, depending on how much
<Layout />
is tied to the presence of a DOMThis pull request seeks to add support for
makeLayout
to be used in rendering client-side logged-in screens. These are pieces from an initial approach in #6311.Few notes on what remains:
ReactDom.render
on an element initially rendered by React when usingmakeLayout
. I suppose this is expected and is indicative of the work we need to do to move away from direct rendering.require( 'layout' );
will probably bomb because of all the DOM-dependent modules it uses. I suppose we'll need a SSR-ready logged-in layout alternative component?/cc @ockham
Test live: https://calypso.live/?branch=update/isomorphic-routing-logged-in