#Supabase subscribe

6 messages · Page 1 of 1 (latest)

void swan
#

I have no idea what I am doing, but I am trying to update a state color via supabase subscribe. But this code only updates one time, but randomly on x clicks.

How is it best to update the state via supabase subscribe?

balmy cairn
#

Try wrapping the first subscribe function chain thing in a useEffect(() ={}, [])

void swan
#

@balmy cairn That worked great! I know nothing of these preact functions, thats my main problem;

https://dagthomas.deno.dev/

Now it can send the data if you open it in multiple tabs. Thanx for the help @balmy cairn

balmy cairn
void swan
#

Never used react either 🙂

balmy cairn
#

That's fair. Just remember to look up for react answers as well on the internet