Function leptos_use::storage::use_session_storage
source · pub fn use_session_storage<T, C>(
key: impl AsRef<str>
) -> (Signal<T>, WriteSignal<T>, impl Fn() + Clone)
Expand description
Reactive SessionStorage.
SessionStorages stores data in the browser that is deleted when the page session ends. A page session ends when the browser closes the tab. Data is not shared between pages. While data doesn’t expire the user can view, modify and delete all data stored. Browsers allow 5MB of data to be stored.
Use [use_local_storage
] to store data that is shared amongst all pages with the same origin and persists between page sessions.
§Usage
See [use_storage
] for more details on how to use.