-
Notifications
You must be signed in to change notification settings - Fork 25.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mention that App.razor always renders statically #31740
Comments
💘 Hello, February! Goodbye, New Year's resolutions! 😆A green dinosaur 🦖 will be along shortly to assist. Stand-by ........ |
Thanks @mrlife ... I'll get to this as soon as I can, but I'm buried in work at the moment. In the meantime, for ...
Can you clarify which paragraph? |
Oh, I see 😄 ... that WAS the paragraph. |
@guardrex, that is an excellent point. Yes, that would be a better workaround than my initial thought of each component. |
Very well ... I'm working that idea into the PR that I'm working on. I'll ping you on the PR shortly and we can take a look at my ideas for addressing this situation. |
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
The text was updated successfully, but these errors were encountered: