
and I'm waiting to see the update (and the console log)

Hmmm unsubscribe is actually subscribing 🤔

well, that's just me storing the unsubscribe method

so that I can call it at the end of the useEffect

useEffect(() => {
getQuestionsFromDB();
const unsubscribe = client.subscribe(
`databases.${DB_ID}.collections.${COLLECTION_ID}.documents`,
(res) => {
console.log({ res });
if (
res.events.includes(
"databases.*.collections.*.documents.*.update"
)
) {
setQuestions((prevQuestions) => {
return prevQuestions.map((question) => {
if (question.$id !== res.payload.$id) {
return question;
}
return res.payload;
});
});
}
console.log("UPDATED QUESTIONS");
}
);
return () => {
unsubscribe();
};
}, []);

this is the entire useEffect inside of my App.jsx

this code worked, I haven't changed anything but then the event stopped firing

are there any limitations? 🤔

btw, the update method works too, I just don't get the realtime event and I have to manually refresh the page

If i remember it well, the only limitation was that you can't have a lot of simultaneous connections

But I think it's not the case

Thai is Appwrite cloud, right?

no, I'm just testing this on localhost

yes

Ok. Do you can send me your project ID?

sure: 6694b8f8000ff3696830

cc @Steven

ok, now it seems to be back

🤷♂️

no changes in my code

Steven will take a look soon into it to check logs and see if there's an issue from Appwrite's side and your specific project

thank you

Maybe it's an issue with your network 🤔🤷♂️

No idea, sincerely 😅

well, I can chat with you here and all the other apps that are connected to the internet are working fine 😅
Recommended threads
- how many Teams can be created?
I am creating an app where I will let users create groups. This could mean there will be many groups created by user, to isolate those groups properly I am thin...
- React native app login via Safari
Hi! I deployed for debug my React Native app in web, chrome everythink works well but in safari on mac and ios I cant login. I found this one error in safari co...
- Error Generation of certification for cu...
Hi, I tried to connect a custom domain, this worked but creating the certification afterwards fails with the following error: ```txt Failed to create TLS subsc...
