hi , so currently trying to move from pocketbase to appwrite and kinda stuck.. I wanna implement realtime for all collections so users get updated records all the time.. im using treact native sdk and I can fetch collection but realtime doesn't work as I keep getting
Realtime got disconnected. Reconnect will be attempted in 1 seconds. Stream end encountered am I doing something wrong ?
import {Client, Databases} from 'react-native-appwrite';
const fetchEvents = async () => { try { let result = await databases.listDocuments(databaseId, collectionId); let documents = result.documents;
setEvents(documents);
console.log('Documents:', events);
client.subscribe(`collections.${collectionId}.documents`, (response) => {
let updatedDocuments = response.payload;
setEvents(updatedDocuments);
console.log('Updated Documents:', updatedDocuments);
});
} catch (error) {
console.error(error);
}
};
Recommended threads
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...
- Custom Domains
Hi All, Should be a quick config issue. I'm setting up custom domains on the hosted version. I have verified the domain with the CNAME but appwrite isn't gene...