Reputation: 713
I am trying to build a demo of Storing employee record in app using react native. I have searched about how to store data using react native and I come to know that using AsyncStorage we can stored data. So My question is
1.what is the way to store data like we did in core data ios?
2.How did we create multiple tables?
3.How did we established relationship between multiple tables?
Correct me if I am wrong?
Upvotes: 1
Views: 2478
Reputation: 1052
Try Redux with Redux-Persist.
You can use Async storage to maintain proper structure and Async rendering too (other benefits of redux).
You can do something like
const persistConfig = {
key: 'root',
storage,
whitelist: ['aaaa', 'vvvv'],
};
where storage can be of different types:
localStorage
SessionStorage
Async Storage
as mentioned in redux persist docs
Also you can blacklist (except) or whitelist (only) certain reducers
Upvotes: 1