Search code examples
react-nativenosqlofflineapps

How to store data when offline with a React Native app?


I am currently creating a React Native app which will require the user to be able to store data offline and then once only it will sync to the database. I have heard of PouchDB but don't quite understand how to implement it so advice on this might be a solution.

I am unsure which services to use due this being my first time creating a complete React Native app. I have experience using React JS, Express and Sequelize however I don't think I can use Sequelize with a React Native App.

I would like to use either NoSql or a MySQL database, however, I am open to either.

Any advice on what services to yous, languages, guides, videos would be great as I've been stuck on this for a while.


Solution

  • You can use Cloud Firestore which is part of Firebase. It's a NoSQL, offline-first database that works as you are describing and it's pretty easy to use with React Native.

    Docs: https://rnfirebase.io/firestore/usage