-
Type: Bug
-
Resolution: Cannot Reproduce
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Realm React
How frequently does the bug occur?
Always
Description
Hi @kneth and @takameyer ,
Here is a problem i have found with realm.
@realm/react is hook i am using in view components to for CURD operations.
I am using Realm.config in RealmMangerClass for listening the changes in old fashion and changed data was updated to server. I am writing the response from server to realm. These are all happing in RealmManager
In this way. i am initialising same config at two place. createRealmContext at App.js and Realm.open in RealmManager class
In random case both (RealmContext and Realm.open) > write to db.
This is causing two errors:
- realm already in write transaction
- [Error: Exception in HostFunction: Accessing object of type Tasks which has been invalidated or deleted]
Is there any way i can get reference of realm from createRealmContext. where i can use it in RealmManager class instead of initialising again in Class
I want to use hook on UI and listen to listener and do CURD operations in old fashion at same time.
Stacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
11.3.1
What services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
android 13
Build environment
Which debugger for React Native: ..
Cocoapods version
No response