Agent skill

SSR (Server-Side Rendering)

Hydration, TransferState, and Prerendering standards.

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/ssr

Metadata

Additional technical details for this skill

labels
angular ssr hydration server-side
triggers
{
    "files": [
        "**/*.server.ts",
        "server.ts"
    ],
    "keywords": [
        "hydration",
        "transferState",
        "afterNextRender",
        "isPlatformServer"
    ]
}

SKILL.md

SSR (Server-Side Rendering)

Priority: P2 (MEDIUM)

Principles

  • Hydration: Enable Client Hydration in app.config.ts.
  • Platform Checks: Use afterNextRender or afterRender for browser-only code (e.g., accessing window).
  • TransferState: Use makeStateKey and TransferState to prevent double-fetching data on client.

Guidelines

  • Browser Objects: Never access window, document, or localStorage directly in component logic. Implement abstractions or use afterNextRender.
  • Prerendering: Use SSG for static pages (Marketing, Blogs).

References

  • Hydration

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results