ReadonlynameReadonlykeyThe key in the driver, with the namespace.
ReadonlydefaultReads the value. Unreadable data gives the default value and is reported to onError.
Validates, encodes and saves a value. Pass a function to update from the current value.
Rejects with VALIDATION_FAILED, UNSERIALIZABLE, VALUE_TOO_LARGE, INVALID_OPTION or
DRIVER_ERROR; nothing is written then.
Deletes the stored value; reads return the default value afterwards.
Reads the value into the cache, so getSnapshot stops reporting loading.
ReadonlygetThe current state, without waiting. For useSyncExternalStore.
ReadonlysubscribeCalls listener after every change. For useSyncExternalStore.
One typed value in a Storage. Create it with
storage.item(name, options).subscribeandgetSnapshotfollow the contract of React'suseSyncExternalStore, which is whatuseStorageItembuilds on.