Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access AsyncStorage from native code

I need to persist data in local storage using AsyncStorage from JS code.

I would like to know if there is a way to access data stored from AsyncStorage from native code (Objective-C or Java).

Thanks!

like image 965
Jean Lebrument Avatar asked Dec 29 '15 16:12

Jean Lebrument


1 Answers

If you import RCTAsyncLocalStorage.h, you can call _getValueForKey: https://github.com/facebook/react-native/blob/master/React/Modules/RCTAsyncLocalStorage.m#L266

like image 180
John Shammas Avatar answered Sep 22 '22 04:09

John Shammas