I am building my first app with react native. I am, for now, storing locally with AsyncStorage the user data. This app is going to make users interact with each other, I am looking at realm.io but for my understanding all the mobile apps save the data locally then sync it to a database. I am not sure if this is the way and I am doing correct. Basically what I want to do is :
- Open the app, load the user data from AsyncStorage
- Call the database (from a server) download other users data
- Store user and users data in to the state of the app (I use redux)
- Sync with the live database at each interaction.
Is this the correct way? For example if is a chat and I want to store the data for both users in to the database, how do I do? So to recap, how do I store the app data for all users in a live database that is on a server?