Using Realm in React Native app with Redux Using Realm in React Native app with Redux sqlite sqlite

Using Realm in React Native app with Redux


The redux store is good when you have only react components dealing with the data. The store is a good way to maintain your application's state. For example, you do not need Realm to store the current login status or flags indicating whether the user has skipped login. The redux store wins the game here.

On the other hand, Realm is the best when you have to deal with complex queries or a large amount of data to be stored. The advantage of having Realm is that the data can be accessed within your react components as well as non-react components/classes easily. Realm gives you the advantage to monitor your data with the Realm Browser and build relationships between your models. Realm also wins the race if you have to do any offline sync.

Will it have to exist external to the store - Yes.

Is using Realm within a Redux based app somehow a contradiction - It depends upon what you are using the storage for.