Agent skill · Data & Analytics

support-prerendering

Make interactive Blazor components work correctly with prerendering. USE FOR fixing duplicate data loads, UI flicker during prerender-to-interactive handoff, null references during prerender, persisting state across prerender, disabling prerendering, excluding pages from interactive routing, or detecting whether a component is currently prerendering. DO NOT USE for choosing which render mode to use (see create-blazor-project) or general component authoring (see author-component).

.NET Platform4,927★ · 1 repos on radarProfile →
claude-codeMIT
Install
npx skills add dotnet/skills --skill support-prerendering --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 7 KB
Bundled scripts: none
Path: plugins/dotnet-blazor/skills/support-prerendering/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 4,927
Language: C#
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Support Prerendering ## How Prerendering Works Prerendering is **on by default** for all interactive render modes. The server renders the component as static HTML and ships it to the browser immediately. Then the interactive runtime (Server/WebAssembly) loads and re-renders the component with full interactivity. This means: - `OnInitializedAsync` runs **twice** — once during prerender (static), once when the interactive runtime attaches. - `OnAfterRenderAsync` is **NOT** called during prerender — only after the interactive render. - Internal navigation between interactive pages (interactive routing) **skips prerendering** — prerendering only happens on full page loads. ## Step 1 — Read the Project's AGENTS.md Check the project's `AGENTS.md` for the **Interactivity Mode** and **Interactivity Scope**: | Mode | Prerendering applies? | |------|----------------------| | None (Static SSR) | No — there's no interactive handoff | | Server | Yes | | WebAssembly | Yes | | Auto | Yes | If the mode is `None`, this skill doesn't apply. ## Persist State Across Prerender → Interactive The most common prerendering problem: data loaded in `OnInitializedAsync` during prerender is thrown away and r

What's inside
Steps it walks through
  1. How Prerendering Works
  2. Step 1 — Read the Project's AGENTS.md
  3. Persist State Across Prerender → Interactive
  4. Recommended: [PersistentState] attribute
  5. Multiple instances of the same component
  6. Advanced: PersistentComponentState service
  7. Disable Prerendering
  8. On a component definition
  9. On a component instance
  10. On the entire app
  11. Exclude Pages from Interactive Routing
  12. Detect Prerender vs Interactive at Runtime
  13. Client Services Fail During Prerender
  14. Don'ts
More from skills
All skills →
About this skill
What does the support-prerendering skill do?

Make interactive Blazor components work correctly with prerendering. USE FOR fixing duplicate data loads, UI flicker during prerender-to-interactive handoff, null references during prerender, persisting state across prerender, disabling prerendering, excluding pages from interactive routing, or detecting whether a component is currently prerendering. DO NOT USE for choosing which render mode to use (see create-blazor-project) or general component authoring (see author-component).

How do I install it?

Run `npx skills add dotnet/skills --skill support-prerendering --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From dotnet/skills, a repository with 4,927 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going