Wipe AsyncStorage in react native

jsdario picture jsdario · Sep 6, 2016 · Viewed 44.1k times · Source

I notice that I am wasting a certain amount of time debugging redux actions that I am persisting to AsyncStorage in react-native thanks to redux-persist. Sometimes I'd just like to wipe AsyncStorage to save some development time and try with fresh data.

EDIT: Best case the solution should work on simulators and real devices, iOS and Android. Maybe there are different work arounds for different platforms.

Thanks

Answer

Tony Vincent picture Tony Vincent · Sep 6, 2016

Try using clear() function which erases all AsyncStorage for all clients, libraries, etc