Skip to content
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

Root-level cascading values 8.0 #30095

Merged
merged 6 commits into from
Aug 22, 2023
Merged

Root-level cascading values 8.0 #30095

merged 6 commits into from
Aug 22, 2023

Conversation

guardrex
Copy link
Collaborator

@guardrex guardrex commented Aug 18, 2023

Fixes #30093

Steve, for ...

something like a global “weather forecast” service that is defined in Program.cs, has some way of getting state changes from an external source of information, and exposes the current forecast as a cascaded value (which may change over time).

Do you want me to draft up something like that now, table it for later (like 24Q1), or not place coverage for that at all?

If you want me to take a 🔪 at it, I'll need some info on triggering NotifyChangedAsync from a service because the tests at ...

https://github.com/dotnet/aspnetcore/blob/f902a5b27cf2d89e555a1cf67ae796d11dab039e/src/Components/Components/test/CascadingParameterTest.cs#L571-L635

... new up the CascadingValueSource in the method. How is NotifyChangedAsync called in a service? What am I registering/injecting to call it because it apparently isn't directly related to the cascading parameter.

Also ...

to expose some information from the original HttpContext to components

Do you have an example cross-link? What I have here is fun, but I could tack on a quick real world example.


Internal previews

📄 File 🔗 Preview link
aspnetcore/blazor/components/cascading-values-and-parameters.md ASP.NET Core Blazor cascading values and parameters

@guardrex guardrex self-assigned this Aug 18, 2023
@guardrex guardrex merged commit 17743d6 into main Aug 22, 2023
@guardrex guardrex deleted the guardrex-patch-2 branch August 22, 2023 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Root-level cascading values 8.0
1 participant