-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For @realm/react export createUseQuery & createUseObject #6252
Comments
Additional advantage for us is ability to have 2 Realms. Basically we have one Realm.Sync and another Realm.Local that is used as a replacement for memory heavy workloads. But we don't want to sync that one. With these functions, we could have 2 realm instances with react functionality. |
@bimusiek we expose a |
Ah, right. Yes, that would probably be enough. Unfortunately due to the way we bundle our app for Electron & React Native, we still cannot use the included library as it imports Closing the comment for now. |
@bimusiek I'd be interested to know if you've created an issue for this and if this issue is also experienced with |
@kraenhansen No issue as it is old workaround from even before Realm was acquired by Mongo. We have the task on our upcoming work to update from Realm@11 to @12. I will check if workaround is not needed, if that won’t be a case I will create the issue. |
That should be seamless, please let os know if it's not! 😊 |
@bimusiek I did recently create an |
@takameyer @kraenhansen I am into the process of upgrade and besides some typing issues it went quite smooth. I got rid of our custom But I am getting error in Electron on renderer side: And in devserver: And I have no clue why this could be happening. |
And the React Native packager throws:
|
Ok, I was missing |
Problem
We want to slowly migrate our codebase to @realm/react. Currently, we have deeply integration of Realm into our React app using our own code.
We would love to gradually migrate, thus we need ability to pass our own
useRealm
, but bothcreateUseQuery
,createUseObject
are not exported.Solution
Simply export both
createUseQuery
,createUseObject
Alternatives
Currently we do pnpm patching to export both those functions.
How important is this improvement for you?
I would like to have it but have a workaround
Feature would mainly be used with
Atlas Device Sync
The text was updated successfully, but these errors were encountered: