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

Use custom headers to render RSC / remote components #50

Open
4 tasks done
lazarv opened this issue Sep 26, 2024 · 0 comments
Open
4 tasks done

Use custom headers to render RSC / remote components #50

lazarv opened this issue Sep 26, 2024 · 0 comments
Labels
enhancement: pending triage An enhancement pending triage

Comments

@lazarv
Copy link
Owner

lazarv commented Sep 26, 2024

Description

The rendering logic is using the standard Accept HTTP header to drive the response type and caching used by the framework. This is not ideal for proxies and caching. See some additional information at #49

Suggested solution

Use custom HTTP headers to drive the rendering logic and to choose the response type and framework level caching type.

  • use React-Server-RSC header to request an RSC payload response
  • use React-Server-Remote header to request an RSC delegation response
  • use React-Server-Standalone header to request standalone type routing logic

Existence of the above HTTP headers will drive the rendering logic.

Possible combinations are:

  • React-Server-RSC with an optional React-Server-Standalone
  • React-Server-Remote with an optional React-Server-Standalone

React-Server-RSC and React-Server-Remote can't be used in the same request!

Alternative

No response

Additional context

No response

Validations

@lazarv lazarv added the enhancement: pending triage An enhancement pending triage label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement: pending triage An enhancement pending triage
Projects
None yet
Development

No branches or pull requests

1 participant