Skip to content

Mention that App.razor always renders statically #31740

@mrlife

Description

@mrlife

Description

The App.razor component always renders statically. One implication is that any services included via @inject directives in _Imports.razor will be created more than once if App.razor's children contain a different render mode.

Everything I've seen about render modes up until now talked about how services would be created more than once if pre-rendering was enabled (once for pre-render and once for the regular render). So, the first paragraph above was unexpected.

ref: dotnet/aspnetcore#53804 (comment)

Page URL

https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/components/render-modes.md

Document ID

7c9948a3-9886-8097-6014-492a4c21ea4e

Article author

@guardrex

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions