Skip to main content

useAsyncStorage

The useAsyncStorage hook provides functions to interact with persistent storage for non-sensitive data. Use this for user preferences, UI state, cached content, or any data where performance matters and encryption is not required. Data is stored in plaintext and persists between app sessions.

Note

Use useAsyncStorage for non-sensitive data like themes, preferences, cached content, or application state. It supports multiple key-value pairs. Use useSecureStorage for sensitive data like authentication tokens. It provides hardware-backed encryption but only stores one secret per Mini and has slower performance.

Caution

Do not store images, base64-encoded images, blobs, or any other binary data in async storage. This is against Shop Minis guidelines and will cause your Mini to be rejected during review. Async storage is designed for small, serializable key-value pairs only. For image handling, use the useImageUpload or useCreateImageContent hooks instead.

Anchor to useAsyncStorage
useAsyncStorage()


Was this page helpful?