Skip to content
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

SSR: Only render into DOM if component tree is not already there #2939

Closed
wants to merge 2 commits into from

Conversation

seear
Copy link
Contributor

@seear seear commented Feb 1, 2016

Experimental. Inside controller.js, only render into the DOM if the component tree is not already there. This eliminates problems with browser lockups when replacing server-rendered component trees inside the existing content divs.

As long as the initial client layout done in client/boot matches the server-layout, the necessary event-handlers will be hooked-up.

This PR uses a simple test component with a button that is rendered on the server at http://calypso.localhost:3000/design (logged-out). It adds a couple of links to the logged-out master bar to switch between logged-out routes.

Can be used as a base for experimenting with routing/layout.
@seear seear self-assigned this Feb 1, 2016
@seear seear changed the title SSR: Render a simple component inside the primary div SSR: Only render into DOM if component tree is not already there Feb 1, 2016
@ehg
Copy link
Member

ehg commented Feb 10, 2016

Closing this, as we're currently using this technique in #3053.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature Group] Appearance & Themes Features related to the appearance of sites. Server Side Rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants