Back to Browse

Using AysncStorage to Store Data in React Native

7.0K views
Dec 10, 2019
32:14

This video demonstrates how to use the AsyncStorage package to store data offline in key-value pairs. This is a great way to store things like app settings/preferences. We will create a mock settings screen that saves and restores various app settings. 00:26 Discussing the settings screen without AsyncStorage and looking at docs 05:52 Creating functions to store data using AsyncStorage 09:44 Creating a function to restore defaults values in AsyncStorage 11:35 Storing theme color state in the React Navigation navigation state 13:00 Highlighting components with colors based on the selected theme color 15:40 Saving AsyncStorage by with JSON.stringify 17:26 Creating a function to get AsyncStorage values using 'getItem' 21:23 Changing the appbar/header color based on an AysncStorage value 27:22 Changing the Switch color based on an AysncStorage value 28:38 Changing the Slider color based on an AysncStorage value 30:00 Testing 💻Get the Code: https://github.com/cheetahcoding/CwC_React_Native/tree/async_storage ⚡Connect on Facebook: https://www.facebook.com/cheetahcoding ⚡Connect on Twitter: https://twitter.com/cheetahcoding

Download

1 formats

Video Formats

360pmp453.5 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Using AysncStorage to Store Data in React Native | NatokHD