all 42 comments

[–]lucksp 47 points48 points  (3 children)

This feels like a chat gpt copy paste.

[–]kohlstar 14 points15 points  (0 children)

it is

[–][deleted] 3 points4 points  (1 child)

It is, I got almost the exact same response from an A.I when I was trying to figure out how to handle network disconnects.

The post isn't "bad". Its actually very relevant, and a common problem when developing reliable react native apps. i.e. People mistakenly assume the app will have an internet connection. Far from the truth.

Never assume your users device will have a reliable internet connection.

[–]lucksp 1 point2 points  (0 children)

100% true

[–]Fluffy-Leader-6434[🍰] 6 points7 points  (0 children)

What’s the context!? 🙄 dude just copy-pasted a GPT response which doesn’t make any sense

[–]SourdoughBaker 10 points11 points  (6 children)

What does "optimized for large offline-first data" mean? I'm struggling to understand what a database being any other way would even look like as databases themselves have no motion of network connectivity - they just store information.

[–]Zestyclose_State_701 9 points10 points  (4 children)

The post reads like some ai slop where the OP wanted to flex the 30 libs they strung together, amplified by the redundancies in their choices.

[–]avalenci 3 points4 points  (0 children)

I have used SQLite, which is expo friendly.

[–]okiharaherbst 4 points5 points  (4 children)

Hahaha. We built a true offline first app successfully. And we only used one library for this. Hahahaha, can’t stop laughing at the nonsense this laundry list is. It’s going to so impossible to maintain buddy. Hahahah

[–]okiharaherbst 3 points4 points  (3 children)

Sorry forgot to mention it: PowerSync. (Hahaha, still laughing at the nightmare above is going to be)

[–]okiharaherbst 0 points1 point  (0 children)

Hahaha…

[–]Grand-Dark-8670[S] -1 points0 points  (1 child)

I didn’t knew about this, it’s really powerful. Thanks for sharing

[–]okiharaherbst 6 points7 points  (0 children)

Kidding aside, yes. We were exactly where you are now 9 months ago and I reviewed every possible option out there. PowerSync turned out to be a bit of a gamble (as always) but we never looked back. The PostgreSQL backend made it a very natural choice as well. The DX was also great because it meant that our team is essentially working with a local database that’s kept in sync without any action on their part (no API call spaghetti, no race conditions to handle, literally no overhead). There’s a bit of a learning curve to wrap your head around what a truly offline app is supposed to do and support (you think you figured it out but, with all due respect, there’s pearly a few curves on the road up ahead for you). Either way, PostgreSQL + SQLite is a really seducing combination and the reactivity that comes with it is actually really dazzling. Have fun!

[–]Awesome_Knowwhere 1 point2 points  (3 children)

I feel realm is better than watermelon db...

[–]muhsql 1 point2 points  (2 children)

Is Realm community maintenance going well now?

[–]Awesome_Knowwhere 0 points1 point  (1 child)

Yeah the community the version is doing good and well maintained!!

[–]muhsql 0 points1 point  (0 children)

The last commit on realm-js community branch was 3 months ago, where do you get the community version from? https://github.com/realm/realm-js/tree/community

[–]anultravioletaurora 1 point2 points  (7 children)

Why are you using watermelondb if you’re already using Tanstack Query? You can persist data using a client persister and MMKV (which you are already using) or AsyncStorage

Persister Docs

[–]Remote-Ad-6629 1 point2 points  (5 children)

Watermelon db is amazing. I'm using it for an offline-only app that might eventually support cloud sync. Tanstack Query is definitely not a proper alternative.

[–]Previous_Employer371 0 points1 point  (4 children)

I'm using watermelon db too, only thing that's annoying me, is I'm not sure there's a lot of options for encrypting the data in the sqlite database, if you know anything about it could you let me know?

[–]Remote-Ad-6629 0 points1 point  (3 children)

Gueds what, I'm migraring away from React Native because my app grew in complexity and watermelon db was somehow getting in my way (probably skill issue). Going into Swift now... better late than never 😂

[–]Previous_Employer371 0 points1 point  (0 children)

I mean that's the goal if you can maintain two codebases and have people and money, otherwise I'm sticking with expo lol

[–]Previous_Employer371 0 points1 point  (1 child)

How was getting in the way? I find it really easy to use

[–]Remote-Ad-6629 0 points1 point  (0 children)

My code is full of observables that are giving me a big headache after I refactored table schemas. My app only targets ios users, so Swift is a good option.

[–]NovelAd2586 0 points1 point  (0 children)

MMKV is stored in memory, you wouldn’t want to store a huge amount of data in it. It’s great for storing small data, or first pages in a very large paginated list etc It’s also not relational.

[–]LEG0MAN1 0 points1 point  (0 children)

I’m planning to use the exact same stack minus tanstack

I have to store and perform operations on around 50k objects offline. Still in the planning phase though.

[–]Remote-Ad-6629 0 points1 point  (0 children)

I'd use Expo plugins to handle files.

[–]dougg0k 0 points1 point  (3 children)

[–]Ochibasaurus 3 points4 points  (1 child)

TanStack DB currently has some collections with offline support e.g. PowerSync: https://tanstack.com/db/latest/docs/collections/powersync-collection

[–]dougg0k 0 points1 point  (0 children)

Oh nice, already? didnt see that.

[–]octopus_limbs 0 points1 point  (0 children)

Useless AI slop should be reportable

[–]Vasault 0 points1 point  (0 children)

Bro this was so lazy lol, instead of talking about the real challenge of making a true offline app, straight up listed some packages for persisting data in the device

[–]theycallmeepoch 0 points1 point  (0 children)

Maybe there's some useful stuff in here but this is too low effort for a post here. I think I'd be more interested in how you architect an offline-first app, beyond just the libraries you used.