What Is AsyncStorage

Get introduced to the concept of AsyncStorage.

Introduction

The key-value storage method AsyncStorage stores data locally in the device. It is a lightweight database of sorts.

Usage

The simplest way to use AsyncStorage is to call getItem and setItem to get and set values.

Note: The values stored need to be of type string.

Storing data

The setItem method will store the value in the @storage_Key key. Let’s say we want to store the value 'Hello'. We can call setItem with the @storage_Key key and the value 'Hello'. The stored data will look something like this.

Get hands-on with 1400+ tech skills courses.