DEV Community

Discussion on: Advanced Blazor State Management Using Fluxor, part 6 - Persisting State

Collapse
mr_eking profile image
Eric King Author

I'm glad you got it working. There's probably a million ways to go about it.

But I do have a question... I'm wondering when Counter.State.Value is null? If Fluxor is initialized correctly, no State should ever be null. You provide a non-null initial State in the Feature.

Collapse
padnom profile image
padnom

You right. It was a shorthand to explain what I do
In my code I use it for display username (string)
var login = loginSate.Value.LoginBackOffice;
if (login.Status == EnumStateLogin.NotInstantiate)
{
return await loginSessionStorage.GetLoginAsync(); ;
}
return login;