Vue SPA Framework - StateManager - Methods
addStateSource(stateSource)
Adds an object that implements an interface of a state source to the state manager's collection of state sources.
To manipulate the application's state, the state manager passes the requests received from the HtmlApplication object to the state sources that are collected using the addStateSource(stateSource) method. The state sources must have the following methods.
- saveState(storage)
- restoreState(storage)
- removeState(storage)
To remove a state source from the state manager's collection, use the removeStateSource(stateSource) method.
clearState()
Removes the application state that has been saved by the saveState() method to the state storage.
The saved application state is not restored after the clearState() method is called.
This method passes the request to clear the saved state to all the state sources that are "known" to the state manager.
removeStateSource(stateSource)
An object that has been added to the collection using the addStateSource(stateSource) method.
restoreState()
Restores the application state that has been saved by the saveState() method to the state storage.
Use this method to restore the current application state when required, e.g., when the application is recreated. This method passes the request to restore the saved state to all the state sources that are "known" to the state manager.
saveState()
Use this method to save the current application state when required, e.g., when the application is closed. This method passes the request to save the current state to all the state sources that are "known" to the state manager.
If you have technical questions, please create a support ticket in the DevExpress Support Center.