Skip to content

Remove note about using interactive server components in an app with a different global render mode #34041

@danroth27

Description

@danroth27

Description

The Interactive SSR section in the Blazor render modes doc has teh following note that appears to be incorrect and misleading:

Important

†If the app adopts global WebAssembly or global Auto rendering via the Routes component, individual components that specify interactive SSR (@rendermode InteractiveServer) in their component definition file (.razor) are placed in the .Client project's Pages folder.

Placing interactive SSR components in the .Client project is counter-intuitive because such components are only rendered on the server.

If you place an interactive SSR component in the server project's Components/Pages folder of a global WebAssembly or Auto app, the component is prerendered normally and briefly displayed in the user's browser. However, the client-side router isn't able to find the component, ultimately resulting in a 404 - Not Found in the browser.

Therefore, place interactive SSR components in the .Client project's Pages folder if the app adopts global WebAssembly or global Auto rendering via the Routes component.

If the render mode is specified globally, then you can't switch to a different render mode in a page or child component as specified by the render mode propagation rules.

I think this note should just be removed.

Page URL

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

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

Related Issues

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions