Description
Following Carl Franklin's application state management in blazor doesn't seem to work in .Net 8.
https://www.youtube.com/watch?v=4WPuGwxZKIA
The local storage instance and the renderfragment appear to be null. in addition getting The render handle is not yet assigned when calling statehaschanged() in the cascading app state throws the following exception "The render handle is not yet assigned."
Here's the github repo the project
https://github.com/vconfrence/BlazorApp1.git
CascadingAppState component which is meant to be a root level cascading value available through cascading parameter within any compoenent doesn't seem to work. LocalStorage and other variables don't seem to be initializing.
Also followed guidelines posted by Microsoft which didn't work
https://learn.microsoft.com/en-us/aspnet/core/blazor/components/cascading-values-and-parameters?preserve-view=true&view=aspnetcore-8.0#root-level-cascading-values
https://learn.microsoft.com/en-us/aspnet/core/blazor/state-management?view=aspnetcore-7.0&pivots=server#handle-prerendering
Page URL
https://learn.microsoft.com/en-us/aspnet/core/blazor/state-management?view=aspnetcore-8.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/state-management.md
Document ID
e5e1273b-195e-5da1-b4aa-66bbcff1425b
Article author
@guardrex
Description
Following Carl Franklin's application state management in blazor doesn't seem to work in .Net 8.
https://www.youtube.com/watch?v=4WPuGwxZKIA
The local storage instance and the renderfragment appear to be null. in addition getting The render handle is not yet assigned when calling statehaschanged() in the cascading app state throws the following exception "The render handle is not yet assigned."
Here's the github repo the project
https://github.com/vconfrence/BlazorApp1.git
CascadingAppState component which is meant to be a root level cascading value available through cascading parameter within any compoenent doesn't seem to work. LocalStorage and other variables don't seem to be initializing.
Also followed guidelines posted by Microsoft which didn't work
https://learn.microsoft.com/en-us/aspnet/core/blazor/components/cascading-values-and-parameters?preserve-view=true&view=aspnetcore-8.0#root-level-cascading-values
https://learn.microsoft.com/en-us/aspnet/core/blazor/state-management?view=aspnetcore-7.0&pivots=server#handle-prerendering
Page URL
https://learn.microsoft.com/en-us/aspnet/core/blazor/state-management?view=aspnetcore-8.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/state-management.md
Document ID
e5e1273b-195e-5da1-b4aa-66bbcff1425b
Article author
@guardrex