Hello everyone. I have one problem. I have made my...
# help
j
Hello everyone. I have one problem. I have made my function to get data from posts table, and it works fine, but I've tried to make the same thing with realtime (pic1) and for some reason its not working. I can get the posts but they appear only on page refresh. I've logged my variable and you can see the results (pic2).
n
Hello @JR23! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
g
Do you have realtime enabled for insert and for that table under database/replication?
n
JR23 (2022-03-30)
g
On a side note, I load my initial table inside the subscribe. If you care about a second or so you could miss post updates after your initial table load, before the subscription has completely setup.
Copy code
.subscribe((status) => {
      ....
       if (status === "SUBSCRIBED") {
            loadTable()}
        })
j
hello @User I have completely missed your answer (irl things). I have realtime enable and its not working. I'm going to finish other things first and then I will try to make realtime works. I really liked your approach I will try that for sure. (its cool to have someone to help, thanks. You really help supabase community )