I am having an Error: Cannot write to class User when no flexible sync subscription has been created.
I have set up my backend, added both App, User and Realm providers as well as enabled Sync.
My schemas are defined and imported as:
import { User } from "./realm/models/User";
import { List } from "./realm/models/List";
import { Todo } from "./realm/models/Todo";
import { Subtask } from "./realm/models/Subtask";
Here is how I configure sync
<RealmProvider
schemas={[User, List, Todo, Subtask, Recurrence]}
sync={{
flexible: true,
initialSubscriptions: {
update(subs, realm) {
subs.add(realm.objects(User));
subs.add(realm.objects(List));
subs.add(realm.objects(Todo));
subs.add(realm.objects(Subtask));
subs.add(realm.objects(Recurrence));
},
},
}}
>
<AppNavigator />
</RealmProvider>
Really Stuck on this one, really wanna make Realm work but nothing seems to work…