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

Flush RSC response inline with SSR response #250

Closed
jplhomer opened this issue Nov 16, 2021 · 0 comments · Fixed by #498
Closed

Flush RSC response inline with SSR response #250

jplhomer opened this issue Nov 16, 2021 · 0 comments · Fixed by #498
Assignees
Labels
framework Related to framework aspects of Hydrogen
Milestone

Comments

@jplhomer
Copy link
Contributor

jplhomer commented Nov 16, 2021

Today, we fetch /react once the client JavaScript is loaded in order to get the RSC response from the server and hydrate the page. This is horribly inefficient, and we should return the RSC response encoded as JSON in a <script> tag along with our SSR response.

For reference, see how Next.js is planning to solve this problem: vercel/next.js#30994

Super clever, and we should be able adopt a similar pattern (or create our own).

@jplhomer jplhomer added the framework Related to framework aspects of Hydrogen label Nov 16, 2021
@morganmccunn morganmccunn added this to the v1.0.0 milestone Nov 17, 2021
@frandiox frandiox self-assigned this Jan 5, 2022
rafaelstz pushed a commit to rafaelstz/hydrogen that referenced this issue Mar 4, 2023
rafaelstz pushed a commit to rafaelstz/hydrogen that referenced this issue Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework Related to framework aspects of Hydrogen
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants