-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
feat(ssr): render portals #714
Conversation
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.
I think it'd be more flexible to get portal content like this:
const portals = {}
const html = await renderToString(app, portals)
console.log(portals['#modal'])
@yyx990803 should they be then received by server rendering code and moved where required, right? I can do that. |
I was testing this locally and realized it's better to pass the ssr context via the app context instead. Handles concurrency and doesn't require nested passing. The previous passing implementation would also require the compiler to generate different code (in order for |
It's probably not the best possible solution, so I'm waiting for comments for improvements.