DEV Community

Discussion on: Advanced Blazor State Management Using Fluxor, part 5 - ASP.NET EditForm Binding

padnom profile image

Thx for you post, very Useful.
I Have a question. How you handle if users refresh page.
Counterstate will be reset. If you want to keep counterState.
How would you implement this?

mr_eking profile image
Eric King Author • Edited on

Well, you would have to take the state and store it off somewhere so that it could be retrieved later.

One place to put the values of the store might be in the browser's localStorage, which would allow you to retrieve the state later for that user on that browser.

You could also store the state in a database somewhere, so it can be retrieved by the user regardless of which browser they are using, as long as they log in so you know who they are.

But how much of the state do you store? How often? And where? How secure do you want that persisted state to be? The answers to those questions really depend on the application.