I'm creating a simple webchat with astro and a firestore database. I'm able to retrieve docs from the database and I have already setup both a message board and the message components. However, I'm at a loss: I can load the page with the correct components by taking the info I need from the databse, but whenever somebody sends a new message to the backend I have no way to refresh the html content or to add a new message component
#Refreshing html page with realtime firestore data
5 messages · Page 1 of 1 (latest)
You need to use a client side JS framework to query your database and render messages, I usually suggest Svelte because it is lightweight, has a similar syntax to Astro, and you can share state between islands on your page, but there are a ton of different options: https://docs.astro.build/en/core-concepts/framework-components/
how can I refresh my html with svelte?
I've found a way to do that, but I cannot use svelte syntax in a .astro file right?