Hello,
Thank you for this amazing service. When opening a Realm, one could handle client resets with the following code:
const handleRealmSyncError: Realm.ErrorCallback = useCallback(
(_session, error) => {
if (realmRef.current) {
if (error.name === 'ClientReset') {
realmRef.current.close();
Realm.App.Sync.initiateClientReset(realmApp, realmPath);
realmRef.current = null;
}
}
},
[realmPath],
);
and opening a Realm with the following sync config:
sync: {
user: currentRealmUser,
error: handleRealmSyncError,
},
But with @realm/react
, we cannot use the useRealm
hook in the same component where RealmProvider
is declared, and thus I have no idea where how to handle any sync errors. We are paying customers and have a couple of deadlines to rush. Please advise, thank you very much!