Returns the key-value `Storage` interface for the extension point.
Returns the key-value `Storage` interface for the extension point.
export function useStorage< ID extends RenderExtensionPoint = RenderExtensionPoint, >(): Storage { return useApi<ID>().storage; }
A key-value storage object for extension points. Stored data is only available to this specific app at this specific extension point. The storage backend is implemented with `localStorage` and should persist across the buyer's checkout session. However, data persistence isn't guaranteed.
Read and return a stored value by key. The stored data is deserialized from JSON and returned as its original primitive. Returns `null` if no stored data exists.
Write stored data for this key. The data must be serializable to JSON.
Delete stored data by key.