46 questions
0
votes
0
answers
80
views
React Native 0.78: WatermelonDB Works in JavaScript but Not in TypeScript
Problem Description:
I am working on a React Native 0.78 project using WatermelonDB. It works fine when using JavaScript, but when I switch to TypeScript, it doesn't work.
I have tried updating Babel, ...
-1
votes
1
answer
364
views
Is watermelondb 0.27.1 compatible with react native 0.76.5?
I created brand new react native typescript application:
npx @react-native-community/cli init ReactNativeTry
It builds and runs smoothly.
Right away i added watermelondb dep according to the doc:
npm ...
3
votes
0
answers
113
views
WatermelonDB Error: EBUSY: resource busy or locked when switching from LokiJSAdapter to SQLiteAdapter with Node.js
I creted a basic Node.js app with WatermelonDB and LokiJSAdapter and is working fine but when I switched to SQLiteAdapter this error start appering. Any ideas hoe to fix that?
Error: EBUSY: resource ...
0
votes
1
answer
126
views
How to srt observable component in watermelondb
How do I sort observable component in watermelondb. The doc says something like this but the docs outdated and currently the newest watermelondb doesnt have sortWith.
const sortComments = sortWith([
...
0
votes
1
answer
70
views
TypeError: Cannot read property '_resetCount' of undefined
I implemented the basic syc example from the watermelondb docs and ran into this issue I cant find anything about anywhere.
Example snippet
The sync request seems to fail without any push/pull action ...
0
votes
1
answer
708
views
TypeError: Cannot read property 'collections' of undefined WatermelonDB React Native
I am developing a React Native aplication using WatermelonDB as my database framework. I have followed Watermelons docs making models, shema, database and helpers; used withObserables to show data but ...
0
votes
1
answer
265
views
Flipper's database plugin does not see ReactNative's db created by WatermelonDB
I've got pure (not Expo) React Native app with WatermelonDB lib for db access.
Being installed on android device the application can create, init and query database, though Flipper's database does not ...
0
votes
1
answer
587
views
WatermelonDB List Sorting
In my react native app, I have a post component. This post component uses withObservables from WatermelonDB to render the post and its comments:
const enhance = withObservables(["post"], ({ ...
0
votes
1
answer
662
views
watermelonDB setting a relation field throws : Cannot read property 'set' of undefined
I have two tables, 'users' and 'clubs,' that are related with a one-to-many relation. This means each user can be associated with many clubs, and each club is owned by one user. However, when ...
2
votes
2
answers
1k
views
Using @writer or @reader methods in WatermelonDB outside of the model class
I'm trying to use the concept of @writer methods and I just can't get it to work.
The @writer methods have been defined in my model class, and I now expect to be able to use them in other components.
...
0
votes
0
answers
57
views
React Native useState not updating
I am trying to use useState however it the setters do not seem to be working. Code has been removed for simplicity. As it stand the code does run however the initial set state is always undefined. ...
0
votes
1
answer
2k
views
Expo Go watermelonDB through @skam22/watermelondb-expo-plugin: NativeModules.WMDatabaseBridge is not defined
Working on an Expo Go mobile app, and I'm looking to use WatermelonDB for database. I'm hoping to use the @skam22/watermelondb-expo-plugin package (as opposed to @morrowdigital/watermelondb-expo-...
1
vote
1
answer
3k
views
Support for the experimental syntax 'decorators' isn't currently enabled (8:3):
I am trying to use @field in my react.js application. This application is bought theme from Themeforest. The error i am facing is this
ERROR in ./src/watermelon/model/Staff.js
Module build failed (...
0
votes
1
answer
623
views
WatermelonDB function hasUnsyncedChanges
I am using WatermelonDB in my RN app. I am trying to display a button if WatermelonDB has unsynced changes. WatermelonDB has a function called hasUnsyncedChanges that returns a boolean. I can get the ...
1
vote
1
answer
514
views
useEffect() and array of deeply nested objects
I am trying to call useEffect() whenever arrayWithDeeplyNestedObjects changes. export default compose(... is part of an offline first database (watermelonDB) and updates arrayWithDeeplyNestedObjects ...