Skip to content

[Blazor] Support @key at the render boundary level for declarative persistent component state #60844

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

Open
javiercn opened this issue Mar 10, 2025 · 0 comments
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@javiercn
Copy link
Member

If you apply @key and @rendermode into a component that uses declarative persistent component state the state fails to persist as an SSRRenderModeBoundary is introduced in the middle of the hierarchy and the @key is applied on the ancestor of the SSRRenderModeBoundary.

  • We need to move the logic for finding the key to the Renderer itself (that way EndpointHtmlRenderer can adjust the behavior).
  • The @key needs to be included in the marker we emit and made available in the .NET side so that the right state key can be derived.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

1 participant