
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
- Deployment Error Logs - Golang Functions
Hi guys - I have been developing an appwrite function via the cloud service with a golang runtime environment. Currently, I only get error messages whilst deplo...
- Offline replication with RXDB
Hey there! Trying out apprwrite with rxdb for an offline focussed application. I cannot seem to find on how to set the permissions on a per document level?
- How to Fetch Item and Include the User/A...
A typical workflow with ORMs is to, for example, fetch an item from the DB and include the user who created it. How would I do that with AppWrite? Is that easil...
