News for hackers. Stuff that matters.
Re:How I learned React Native in a weekend and shipped an app by mambodog on Monday April 24, 2017 @08:31PM (#14189776)
You probably don't need Redux if it's just simple persistence of data.

The simplest option is just to read and write a blob of JSON using the AsyncStorage API: https://facebook.github.io/react-native/docs/asyncstorage.ht...

Another option you could try is Realm, which is commercial but has a free tier (even for commercial apps) and has a pretty simple API: https://news.realm.io/news/introducing-realm-react-native/

Another is the SQLite module which comes with Expo:

Docs: https://docs.expo.io/versions/v16.0.0/sdk/sqlite.html Example: https://github.com/expo/sqlite-example/blob/master/main.js

Re:How I learned React Native in a weekend and shipped an app by cableshaft on Tuesday April 25, 2017 @09:54AM (#14193506)
Okay cool. Good to know that you don't need to use Redux in conjunction with AsyncStorage. I also like SQLite, so I'll investigate that as well.

It'd be really nice if I get away without Redux. It was the main pain point I had with it, everything else was fairly smooth.

Re:How I learned React Native in a weekend and shipped an app by saurabh on Tuesday April 25, 2017 @09:10AM (#14193124)
Highly recommend realm, works like a charm and has migrations too.
Re:How I learned React Native in a weekend and shipped an app by cableshaft on Tuesday April 25, 2017 @09:57AM (#14193522)
I'm sure it works great, but I dislike adding too many layers to my apps. I've been burned too many times by companies that have stopped supporting and moved on to something else, or disappeared, or haven't kept up with the latest iOS changes, or whatever, and I'm forced to migrate to a different solution, to let myself use these for my personal projects, where I have very limited time and energy.

Even using React Native is more than I'd normally do, but I don't see a better cross-platform option right now.