Session
Advanced State Management in Blazor WebAssembly
It would be great closing a complex Web page and then finding that page in the same state you left it when you return there! I will explain how to retain state while navigating the pages of a Blazor WebAssembly application, and after you close the browser, also when the objects of your application. are tightly coupled.
State management was a central subject since the first RTM of Blazor. Several techniques were proposed to face the problems below:
How to maintain a global application state that persists among page changes.
How to keep state among browser sessions.
How to save the application state in case of crashes, or if the user moves to a different URL / close the browser.
In this talk, after a short review of the various approaches, I propose a new technique based on the usage of a global state dictionary that is accessible globally through DI together with techniques for detecting when the user leaves the application and together with techniques for serializing the application state and saving it in the browser local storage.
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top