-
-
Notifications
You must be signed in to change notification settings - Fork 8.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
Decouple ssr context and rendering? #1314
Comments
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What problem does this feature solve?
Current server rendering is a bit limiting and difficult to extend because it does many things at once.
It creates a full VNode tree for an input, resolves teleports and returns a string.
In order to extend it (for example to await on special hook) you'll have to duplicate all that logic in your custom renderer.
Maybe it'll be beneficial to split resolving VNodes and rendering into separate actions?
This would also resolve an issue with runtime ssr helpers and
renderToStream
and allow bothrenderToStream
andrenderToString
utilize the same buffer, resulting in a simpler code (rendering is bound to buffer constructor inrenderToStream
pull request).What does the proposed API look like?
Or alternatively pass an entire context for rendering to automatically resolve teleports:
The text was updated successfully, but these errors were encountered: