Saving state in a react-native

Viewed 718

I´m building a react native app for my own use(for android), and I don´t get how to save the state of my app, since the idea is to save some text data in the phone. I want to save some orders, which are going to be around 400-700 a year(i´m quite sure this wont increase), so I don´t think I really need like a server with a database.

I saw AsyncStorage but it looks like it´s intended for something else, like login tokens and stuff. Would a text file(csv for example) do the job? Or how would you do it? Thanks

3 Answers

If you don't want to use a server ,You can use firebase realtime database or firebase firestore.

  • RxDB - A realtime Database for JavaScript Applications.
  • WatermelonDB - Next-gen database for powerful React and React Native apps that scales to 10,000s of records and remains fast.
  • realm - An alternative mobile database to SQLite & key-value stores.
  • react-native-storage - This is a local storage wrapper for both react-native(AsyncStorage) and browser(localStorage). ES6/babel is needed.
  • react-native-sqlite-storage - SQLite3 bindings for React Native (Android & iOS)
  • react-native-simple-store - A minimalistic wrapper around React Native's AsyncStorage.
  • react-native-store - A simple database base on react-native AsyncStorage.
  • react-native-easy-app - This is a local storage wrapper for both react-native(AsyncStorage).

Check awesome-react-native. This is list of libraries that can help solve much of your problems

you can use redux-persist if using redux doesn't matter for you!

Related