React Native – AsyncStorage
In this chapter, we will show you how to persist your data using AsyncStorage.
Step 1 – Presentation
In this step, we will create the App.js file.
Step 2 – Logic
Name from the initial state is empty string. We will update it from persistent storage when the component is mounted.
setName will take the text from our input field, save it using AsyncStorage and update the state.