-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Update ResourceCollectionProvider
to take advantage of Declarative persistent component state
#61748
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
base: main
Are you sure you want to change the base?
Update ResourceCollectionProvider
to take advantage of Declarative persistent component state
#61748
Conversation
public string? ResourceCollectionUrl | ||
{ | ||
get => _url; | ||
set => _url = value; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public string? ResourceCollectionUrl | |
{ | |
get => _url; | |
set => _url = value; | |
} | |
public string? ResourceCollectionUrl { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather go towards removing SetResourceCollectionUrl
and moving the exception logic into the setter. This can be done after the bug of preserving the values is found and fixed.
@javiercn, is it possible that we are not restoring the state for webassembly interactive at all? We have it done for server when the circuit is set up:
but I cannot find any aspnetcore/src/Components/WebAssembly/WebAssembly/src/Hosting/WebAssemblyHost.cs Line 140 in 0508333
is the only one but it's not triggered on "rehydration" after prerendering. |
@ilonatommy not sure what's going on here, but we have tests covering this. You could try debugging the sample project to figure out what is going on |
Summary what's going on: Key in prerendering for There are 2 reasons I suspect:
Even if we skip the version by using simplified name Logs for using the simplified assembly name:
|
@ilonatommy good catch. This is something that we solved for other types (AntiforgeryStateProvider) relying on the public abstraction, but I don't think we want to add a public abstraction for this type, as it's completely internal. We should figure out what we want to do here, but there are some options like explicitly providing a key in these cases where stuff is "shared". We want to support passing information across boundaries without having to require any public API, we just need to tweak the way we do this. I think we still want to use the full name to compute the key by default as that's the common case and guarantee's us that we don't squat over types that have the same name. |
Follow-up for #60634.
Description
ResourceCollectionUrl
saving and restoring responsibility is moved toPersistentServicesRegistry
.