Partial hydration
Đang mở
backlog
enhancement
- Ngôn ngữ chính
- TypeScript
- Star
- 38
- Fork
- 1
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
### Feature description
- When a module with `.client` before its file extension is imported, the importer (and its importers, and so on) is marked as a "server-only" module.
- Any modules marked "server-only" are never loaded on the client, and so those modules **cannot** produce HTML that relies on hydration.
### Implementation details
- The static HTML should include empty `
` elements with `data-saus` attribute that tells Saus which JS module needs to be loaded for hydration of that subtree.
- Each renderer package (eg: `@saus/react`) is responsible for hydration of each subtree.
- Each rendered page already has `.html.js` module. Ensure that module contains a map of `data-saus` attributes → JS modules, so it can import them and re-render each of the previous subtrees when a user navigates to its page.
- Each renderer package (eg: `@saus/react`) is responsible for hydration of each subtree.
- Each rendered page already has `.html.js` module. Ensure that module contains a map of `data-saus` attributes → JS modules, so it can import them and re-render each of the previous subtrees when a user navigates to its page.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.