createSessionStorageDataConnector
The createSessionStorageDataConnector function creates a DataConnector that persists Atom data in the browser's sessionStorage API.
createSessionStorageDataConnector<Depth>(options: SessionStorageDataConnectorOptions<Depth>): SessionStorageDataConnector<Depth>| Type | Description | |
|---|---|---|
options | SessionStorageDataConnectorOptions<Depth> | Configuration options for the SessionStorage data connector. |
| returns | SessionStorageDataConnector<Depth> | A |
Data is stored as JSON under the specified storage key. Unlike localStorage, sessionStorage is ephemeral and scoped to a single browser tab or window. Data is cleared when the tab is closed, making it suitable for temporary state that should not persist between sessions.
This connector is designed for browser environments only and will not work in Node.js without a sessionStorage polyfill.
Since
v0.0.0