원클릭으로
render-info
Using the RendererInfo class in Blazor to detect rendering context and interactivity.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Using the RendererInfo class in Blazor to detect rendering context and interactivity.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | render-info |
| description | Using the RendererInfo class in Blazor to detect rendering context and interactivity. |
The RendererInfo class in Blazor provides runtime information about the renderer that is executing the component. It is particularly useful for detecting whether a component is running interactively or statically, and for identifying the specific rendering platform (e.g., Server, WebAssembly, WebView).
IsInteractivebool@if (!RendererInfo.IsInteractive)
{
<p>Connecting...</p>
}
else
{
<button @onclick="HandleClick">Click Me</button>
}
Namestring"Static": Running in static server-side rendering (SSR)."Server": Running in Interactive Server mode (SignalR)."WebAssembly": Running in Interactive WebAssembly mode."WebView": Running in a Blazor Hybrid application (MAUI, WPF, WinForms).<p>Current Render Mode: @RendererInfo.Name</p>
When a component is prerendered on the server, event handlers (like @onclick) are not active. You can use RendererInfo.IsInteractive to disable inputs until the interactive runtime takes over.
<button @onclick="Submit" disabled="@(!RendererInfo.IsInteractive)">
Submit
</button>
You might want to show a simple HTML form for static SSR and a rich, interactive component for interactive modes.
@if (RendererInfo.Name == "Static")
{
<form action="/search" method="get">
<input name="q" />
<button type="submit">Search</button>
</form>
}
else
{
<SearchComponent />
}
AssignedRenderMode: A property on ComponentBase that tells you which render mode was assigned to the component (e.g., InteractiveServer, InteractiveWebAssembly, InteractiveAuto). Note that AssignedRenderMode might be null during static rendering.RendererInfo is available in .NET 8.0 and later.