How to Save Values and Objects in Async Storage in React Native Apps

  Рет қаралды 8,234

MissCoding

MissCoding

Күн бұрын

Hi everyone!
Today I want to show you how to add local storage to your React Native Android and iOS apps written in React Native. By using react native's async storage if you have some data you want to store between different sessions of the app you can save it locally and load it when you load up the app next. It can be useful for providing a good user experience to app users if you haven't yet been able to invest in building APIs for more continuous storage of user data. I will show you how to save and get objects (using json) and singular values from async storage, and I will also show how you can load data for multiple keys at once and also individually get data from the device's local storage. For this tutorial I will show you how to use @react-native-async-storage/async-storage as react native's older AsyncStorage package has been deprecated.
The full code for this tutorial can be found on GitHub:
github.com/chelseafarley/Asyn...
And the full documentation for @react-native-async-storage/async-storage can be found here:
react-native-async-storage.gi...
You’ve clearly come here to learn and a free audible trial allows you to increase your learning potential in situations where you may be hands free like at the gym or on your commute. It allows you to spend more time on theory when you aren’t able to watch a screen, so that you can maximise your screen time to pick up technical skills. Try it for free today:
amzn.to/3ECMsom
// ABOUT ME
My name is Chelsea and I started studying software engineering in 2010. I have been working commercially full time since 2014 and have been in various positions from graduate developer to tech lead to solution architect.
I'm a full stack developer with a lot of experience in C# and Javascript but my passion is for mobile development; specifically native iOS development and cross platform using React Native.
I always have many things on the go and am always trying out a new side hustle and failing at it; perhaps you can learn from my mistakes!
Please like and subscribe if you enjoyed this video and want to see more like it!
Have any suggestions on topics you would like to learn more about? Please suggest them in the comments... I would love to help you out while doing a bit of learning myself!
// PRODUCTS USED
I use the following products in the creation of my videos:
Boya MM1 Microphone - amzn.to/3m6kif7
A reasonable quality and reasonably sturdy but cost effective microphone that can be used by both DSLR cameras, mobile phones and laptops
Canon 18-55mm Lens - amzn.to/3IwscFR
A kit lens but a decent quality lens for beginners getting used to a DSLR
Canon EOS Rebel T7 with 18-55mm Lens - amzn.to/3XZauAL
This is the kit I started with it includes the lens linked above and is a great starter camera.
I love Apple devices... These are the ones I use for my channel content creation:
Apple iPhone 13 - amzn.to/3KAUba4
A good all round phone, good for Apple development and recording videos with enough high quality features but at a cheaper price point than the pro versions.
Apple MacBook Pro - amzn.to/3KxrE5q
A nice portable computer for working from anywhere and perfect for iOS development
Apple iPad Air - amzn.to/3xU2k21
Really easy to use for graphic design if required for logos as part of my app development or editing the videos on the go.
Apple Pencil (2nd Generation) - amzn.to/3EBSwNS
For logo and icon design in Affinity Designer app for iPad
Logitech Folio Keyboard Touch - amzn.to/3XUYBM1
Adds keyboard and touchpad to iPad Air, making it easier to use for writing code/eBooks etc. on the go!
DISCLAIMER: Links included in this description might be affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. There is no additional charge to you! Thank you for supporting my channel so I can continue to provide you with free content each week!
//CONTACT:
Please contact me at: hello@tripwiretech.com
//CRAVING MORE:
You can find links to all my different sites and social media over on Linktree: linktr.ee/misscoding

Пікірлер: 14
@keyurshah95
@keyurshah95 Жыл бұрын
You are the MVP of react native!!! First channel I search
@Sujetsi
@Sujetsi 2 жыл бұрын
Good stuff! I was looking for an updated guide. Thanks!
@MissCoding
@MissCoding 2 жыл бұрын
Thank you for watching!
@kwabenaboateng7405
@kwabenaboateng7405 Жыл бұрын
Simple. Straight forward. Clear. Great tutorial💪💪💪💪💪💪💪
@MissCoding
@MissCoding Жыл бұрын
Thank you! Hope it helped :)
@ifeanyinnaemego
@ifeanyinnaemego Жыл бұрын
Please do you have a video. On how I can save a video from an API offline.
@leoporty2924
@leoporty2924 Жыл бұрын
I get a problem to save a apikey into my asyncstorage, i cansee into a alert text for debug just. (get a error about of object)
@roiiroii9561
@roiiroii9561 10 ай бұрын
This is a very nice video but i have a real problem which is taking me days. I retrieve Items from a local database which has an ID I want to increase the count for each individual item that i have in my cart. I can show items, can add them to the cart, but when it comes to increment, Every item gets incremented. Its been a very long time & i cant solve it. Can you please create a video about a cart & multiple items with ID's?
@sjaakgroeneveld9041
@sjaakgroeneveld9041 2 жыл бұрын
I get a Render error: "Objects are not valid as a React child (found: object with keys {greeting, test} If you meant to render a collection of children, use an array instead. "
@keyurshah95
@keyurshah95 Жыл бұрын
JSON.stringify() the object before trying to display it
@leoporty2924
@leoporty2924 Жыл бұрын
i have the same problem and the JSON.Stringify not resolve :(
@thesmartideas4246
@thesmartideas4246 2 жыл бұрын
Error kindly update
@mohammadMakarati
@mohammadMakarati 2 жыл бұрын
❤❤🌷
What’s the Best React Native Storage Option? 🧐
12:53
Simon Grimm
Рет қаралды 31 М.
Super gymnastics 😍🫣
00:15
Lexa_Merin
Рет қаралды 92 МЛН
1 класс vs 11 класс  (игрушка)
00:30
БЕРТ
Рет қаралды 3,5 МЛН
Stay Logged in With AsyncStorage & Logout - React Native
19:46
Full Stack Niraj
Рет қаралды 22 М.
React Native Tutorial - Save Data In Your Application With AsyncStorage
9:12
Fullstack Development
Рет қаралды 63 М.
Learn React Hooks: useCallback - Simply Explained!
17:15
Cosden Solutions
Рет қаралды 72 М.
ВСЕ МОИ ТЕЛЕФОНЫ
14:31
DimaViper Live
Рет қаралды 69 М.
5 НЕЛЕГАЛЬНЫХ гаджетов, за которые вас посадят
0:59
Кибер Андерсон
Рет қаралды 1,6 МЛН
keren sih #iphone #apple
0:16
kadangaruan
Рет қаралды 1,6 МЛН
ВЫ ЧЕ СДЕЛАЛИ С iOS 18?
22:40
Overtake lab
Рет қаралды 112 М.