Skip to content

Root-level cascading values 8.0#30095

Merged
guardrex merged 6 commits intomainfrom
guardrex-patch-2
Aug 22, 2023
Merged

Root-level cascading values 8.0#30095
guardrex merged 6 commits intomainfrom
guardrex-patch-2

Conversation

@guardrex
Copy link
Copy Markdown
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
@guardrex guardrex mentioned this pull request Jan 3, 2025
96 tasks
@guardrex guardrex mentioned this pull request Feb 6, 2026
67 tasks
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