As your application becomes more complex, you will likely reach a point where you need to store data on the device. This could be business data, such as user lists, to avoid having to make expensive network connections to a Remote API. Maybe you don't have an API at all and your application works as a self-sufficient entity. Regardless of the situation, you may benefit from leveraging a database to store your data. There are multiple options for React Native applications. The first option is AsyncStorage, which we covered in the Storing and retrieving data locally recipe in this chapter. You could also consider SQLite, or you could write an adapter to an OS-specific data provider, such as Core Data.
Another excellent option is using a mobile database, such as Realm. Realm is an extremely fast, thread-safe, transactional...