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

[RFC] Server only components #73

Open
aleclarson opened this issue Jul 2, 2022 · 0 comments
Open

[RFC] Server only components #73

aleclarson opened this issue Jul 2, 2022 · 0 comments
Labels
proposal An idea not set in stone roadmap

Comments

@aleclarson
Copy link
Contributor

aleclarson commented Jul 2, 2022

  • All components are server-only when the nearest route layout has no hydrator defined.
  • For component subtrees to opt-in to client-side rendering, they need to attach some special data- attributes to the subtree's root element.
    • One attribute will tell Saus which component module to import and which export specifier points to the component (eg: data-import="/path/to/module.js#MyComponent").
    • The 2nd attribute will tell Saus which hydrator module to import (eg: data-hydrate="/path/to/module.js").
    • The final attribute is optional, and it will tell Saus when to hydrate (eg: data-when="visible"). If undefined, Saus will hydrate the subtree immediately after its modules are loaded.
@aleclarson aleclarson added roadmap proposal An idea not set in stone labels Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal An idea not set in stone roadmap
Projects
None yet
Development

No branches or pull requests

1 participant