Hi @mohammad mir ,
The ComponentApplicationState service allows a component to retrieve the state when initializing the component. It applies to the Blazor component, and it is the component level sate management. You can check the following article to use it:
Preserve Component State Tag Helper
Prerender and integrate ASP.NET Core Razor components
The Fluxor is a zero boilerplate Flux/Redux library, it will use a global store to store the state. Then you can get the latest state from the store. It is the application-level state management. More detail information about using it, see Fluxor - documentation.
For transient data that the user is actively creating, a commonly used storage location is the browser's localStorage and sessionStorage collections:
- localStorage is scoped to the browser's window. If the user reloads the page or closes and re-opens the browser, the state persists. If the user opens multiple browser tabs, the state is shared across the tabs. Data persists in localStorage until explicitly cleared.
- sessionStorage is scoped to the browser tab. If the user reloads the tab, the state persists. If the user closes the tab or the browser, the state is lost. If the user opens multiple browser tabs, each tab has its own independent version of the data.
More detail information, check the following links:
Browser storage for Blazor WebAssembly app
Browser storage for Blazor Server app
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion