createLocalStorageDataConnector
The createLocalStorageDataConnector function creates a DataConnector that persists Atom data in the browser's localStorage API.
createLocalStorageDataConnector<Depth>(options: LocalStorageDataConnectorOptions<Depth>): LocalStorageDataConnector<Depth>| Type | Description | |
|---|---|---|
options | LocalStorageDataConnectorOptions<Depth> | Configuration options for the LocalStorage data connector. |
| returns | LocalStorageDataConnector<Depth> | A |
Data is stored as JSON under the specified storage key. LocalStorage provides persistent storage that survives browser restarts and is shared across all tabs and windows of the same origin. The storage is synchronous and has a typical size limit of 5-10MB depending on the browser.
This connector is designed for browser environments only and will not work in Node.js without a localStorage polyfill.
Since
v0.0.0