Loading video...

Video Failed to Load

Go Home

Fun fact: you can create state *on the server* with Astro and Preact signals. Easiest way to share state between islands 👀

48,528 views • 1 year ago •via X (Twitter)

9 Comments

Eric Burel's profile picture
Eric Burel1 year ago

Any good read on the consequence of it? Whenever I see server-side state, my first question is : how is it stored. My second is : is it user-specific and if yes how is it secured. Eg for Phoenix they securely allocate some state in the server memory as far as I understand

Astro's profile picture
Astro1 year ago

This just creates an *initial* state value to serialize on the client. It doesn't persist across requests! Think of this like a simple way to share client state across components

Thomas Juranek's profile picture
Thomas Juranek1 year ago

"Your users table probably has 0 entries" Absolute savagery.

Vignesh Aithal's profile picture
Vignesh Aithal1 year ago

So, can we create SaaS on Astro using this? Like to share auth state?

Dmytro's profile picture
Dmytro1 year ago

Is it per-session or what? Seems like per-instance. Not clear, but crucial to understand for whom this state’s data is allocated.

Klynets's profile picture
Klynets1 year ago

Hey @astrodotbuild Is there an option to rename <astro-island> tag to something custom (e.g. <custom-name>) ?

AnEmortalKid 🦝 🦝's profile picture
AnEmortalKid 🦝 🦝1 year ago

Wait preact is an actual name and not a meme ?

rong-sen-e/acc's profile picture
rong-sen-e/acc1 year ago

Is signal serializable?

Soheil's profile picture
Soheil1 year ago

@dean_rie This could work great for implementing collaboration across users and synchronizing and replaying actions. How fast, scalable and secure is it?

Related Videos