Hi,
I am working on a React Native app, but unfortunately the synchronization between the app and Atlas is not working. The structure of my app follows exactly the template: https://www.mongodb.com/docs/realm/sdk/react-native/bootstrap-with-expo/
<AppProvider id={process.env.REALM_APP_ID}>
<UserProvider fallback={<SignIn />}>
<RealmProvider sync={{
flexible: true,
onError: error => console.error(error)
}}>
<App />
</RealmProvider>
</UserProvider>
</AppProvider>
Nevertheless, I don’t get any results with useQuery(), although records are available in Atlas.
const data = useQuery(Data)
console.log(data.length)
==> 0
I am on:
- “@realm/react”: “^0.4.1”
- “realm”: “^11.3.1”
In MongoDB Compass I can see that a collection “state_data” has been created in the database “_realm_sync…”. Why can’t I access the data? What can be the reason for this?
Many greetings