Resources
1Install
npx skillscat add hoangnguyen0403/agent-skills-standard/ssr-server-side-rendering Install via the SkillsCat registry.
SKILL.md
SSR (Server-Side Rendering)
Priority: P2 (MEDIUM)
Principles
- Hydration: Enable Client Hydration in
app.config.ts. - Platform Checks: Use
afterNextRenderorafterRenderfor browser-only code (e.g., accessingwindow). - TransferState: Use
makeStateKeyandTransferStateto prevent double-fetching data on client.
Guidelines
- Browser Objects: Never access
window,document, orlocalStoragedirectly in component logic. Implement abstractions or useafterNextRender. - Prerendering: Use SSG for static pages (Marketing, Blogs).