News for hackers. Stuff that matters.
Re:WatermelonDB, a database for React and React Native apps by tomhoward on Tuesday September 11, 2018 @07:07AM (#17958610)
Because it's very cumbersome, interfacing between Javascript and SQLite, and mapping between database records and Javascript objects. And it doesn't easily fit with the React way of doing things without some library to abstract away all the wiring.

I started building a hybrid mobile app (not React) with a large SQLite database about 4 years ago and have kept working on it ever since, and I've found the data storage aspect of the app very painful to maintain and extend.

I'm now starting to rebuild it using React Native, and a storage plugin like this could be perfect.

I'd been looking at Realm, but haven't gotten as far as committing to it yet, so I'll take a close look at WatermelonDB too.

Re:WatermelonDB, a database for React and React Native apps by pknopf on Tuesday September 11, 2018 @07:17AM (#17958659)
I'm not buying the "too cumbersome to use SQLite" argument.

This still seems like a large unnecessary abtraction.

Re:WatermelonDB, a database for React and React Native apps by tomhoward on Tuesday September 11, 2018 @08:18AM (#17958998)
Sincere question: do you much work in React/React Native with large SQLite databases or other large data stores?

As the sibling (and better) comment[1] to my original comment points out, this library makes the data automatically observable throughout the React app, making it much simpler to update views in response to database changes.

I can understand you might not understand the value of this if you hadn't done a lot of work with React apps that have large data sets and where data changes need to be reflected in multiple different views.

[1] https://news.ycombinator.com/item?id=17958822

Re:WatermelonDB, a database for React and React Native apps by anaganisk on Tuesday September 11, 2018 @11:16AM (#17960486)
Why don't you try linking react with a large Sqlite, and later build a wrapper of your own, and then release it in HN next year as, pinappleDB?