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

Auto start layout engine when hydrating server rendered content #149

Open
joeldenning opened this issue Sep 28, 2021 · 0 comments
Open

Auto start layout engine when hydrating server rendered content #149

joeldenning opened this issue Sep 28, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@joeldenning
Copy link
Member

It should not be possible to have a different layout definition in the browser than the one that was server rendered. Easiest way to solve this is to add all information to window.singleSpaLayoutData and use that information to automatically construct a client-side layout engine. Maybe something like this:

// client-side code
import { hydrate } from 'single-spa-layout';

hydrate()
@MilanKovacic MilanKovacic added the enhancement New feature or request label Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants