I have a use case for accessing Realm within a React component and outside the component tree(e.g. accessing Realm from headless task or from CarPlay/Android Auto templates). At the moment, we can't pass a configured Realm instance to RealmProvider from @realm/react.
Solution
I'm using this approach to create a custom provider. I think it would be better if we could pass a configured Realm instance to RealmProvider instead of passing the schemas. I'm okay if this is something that won't be implemented as the workaround is working fine for me.
Problem
I have a use case for accessing Realm within a React component and outside the component tree(e.g. accessing Realm from headless task or from CarPlay/Android Auto templates). At the moment, we can't pass a configured Realm instance to
RealmProvider
from@realm/react
.Solution
I'm using this approach to create a custom provider. I think it would be better if we could pass a configured Realm instance to
RealmProvider
instead of passing the schemas. I'm okay if this is something that won't be implemented as the workaround is working fine for me.Alternatives
No response
How important is this improvement for you?
Fairly niche but nice to have anyway
Feature would mainly be used with
Local Database only