Is there a simple Synchronous Storage option for react native?

For those who are searching for this, I found this npm package that served this need

react-native-sync-localstorage


I don't think there is a simple synchronous storage option. According to this answer localstorage is not implemented in the core IOS javascript engine. AFAIK the other options such as those used in this localstorage polyfill don't work. That leaves us with needing a react native module which are asynchonous by design. From the docs:

React Native bridge is asynchronous, so the only way to pass a result to JavaScript is by using callbacks or emitting events

So I think Async is the way to go.

Tags:

React Native