首页指南参考教程
This is documentation for the next SDK version. For up-to-date documentation, see the latest version (SDK 51).

AsyncStorage

A library that provides an asynchronous, unencrypted, persistent, key-value storage API.

Android
iOS
macOS
tvOS
Web

An asynchronous, unencrypted, persistent, key-value storage API.

Installation

Terminal
npx expo install @react-native-async-storage/async-storage

If you are installing this in an existing React Native app (bare workflow), start by installing expo in your project. Then, follow the additional instructions as mentioned by library's README under "Installation in bare React Native projects" section.

Usage

See Async Storage's documentation for usage instructions.

Expo 中文网 - 粤ICP备13048890号