
useEffect(() => {
const { client } = createClient();
const unsubscribe = client.subscribe(`databases.${process.env.EXPO_PUBLIC_APPWRITE_DATABASE}.tables.68a3fd390007b23f8ee7.rows.68b2f2e0001bdd8aeda6.update`,
(response) => {
console.log(response);
},
);
return () => {
unsubscribe();
};
}, []);
The above is my code, this is just a test. I have confirmed that all IDs are correct and the table has CRUD (any) permissions set. Then I updated the data in the AppWrite Cloud Dashboard, but I still didn't receive any response.
Seniors please help, I'm really at a loss as to what to do. I'm using the react-native-appwrite package and the environment is expo development build.
Please help me, I have posted many times but never received a response. I have not made any progress on the project for two weeks because of this problem.
I have encountered a new problem. I found that I must set the table permission to ANY READ so that I can receive the response of the real-time connection.
This is the package i use: "react-native-appwrite": "^0.13.0",

yeah im having the same problem right now

oh do we need to use the new tablesDB stuff? this is what mine looks like:
useEffect(() => {
if (!roomId) return;
// initial fetch
fetchMessages();
// subscribe for realtime updates
const unsubscribe = client.subscribe('databases.main.collections.messages.documents', response => {
console.log(response.payload);
// fetch messages again if in the same room
if (response.payload.roomId === roomId) {
fetchMessages();
}
});
return () => {
unsubscribe();
}
}, [roomId]);
Recommended threads
- I had a new error pop up today when test...
I've been working on my app, it worked fine previously but now I recieve Invalid Origin: Register your new client as a new iOS platform on your project console ...
- CLI Error: Email and URL Field Types Not...
CLI throws "Unsupported attribute type: email" when pushing tables with `email` or `url` field types. Environment - CLI: appwrite-cli (npx) - Region: NYC Cloud...
- Auth missing scope account
[500] GET /dashboard ReferenceError: user is not defined at _page (src/routes/dashboard/+page.svelte:24:2) at eval (.svelte-kit/generated/root.svelte:71...
