At first, my RN app was using only AsyncStorage to store my authentication parameters for a user.
Lately, i've decided to integrate redux to this app so i can have a global storage, robust code structure and clean unit test.
So i did implement Redux & Redux-thunk. It worked fine, but i've noticed something that intrigued me. When i'm refreshing my app, i've noticed my redux state was not persisted.
I was losing my authentication credentials. In production, that would probably means my user would have to log in everytime he closes my app.
So i had to implement redux-persist
using AsyncStorage.
My question is : Why do i need to implement redux-persist in my react-native app when AsyncStorage is already, by definition,
a simple, unencrypted, asynchronous, persistent, key-value storage system that is global to the app.
?
Thanks for your explanation