Naoto Ida
Naoto Ida

Reputation: 157

Persistent storage for React Native Webview

I'm trying to use local storage in Webview with React Native. I've noticed it gets wiped when unmounting the component containing the Webview.

Is there a way to keep it around? Or would a better solution be to retrieve the values, pass it to AsyncStorage?

Upvotes: 9

Views: 4755

Answers (1)

papacostas
papacostas

Reputation: 858

I guess you could use react-native-webview-bridge to seed an AsyncStorage storage, you can either way retrieve and set values in a webview with it

Upvotes: 2

Related Questions