[RFC] Server only components
- 主要語言
- TypeScript
- 星號
- 38
- 分支
- 1
- PR 合併指標
- 30 天內沒有已合併 PR
描述
- All components are server-only when the nearest [route layout](https://github.com/alloc/saus/issues/70) 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.
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。