298 Followers
116 Following
88 Posts
Svelte Ambassador | Frontend Lead | he/him
for now find me on 🦋: @fubits.dev
Tags: #Svelte #Astro #SvelteKit #DataViz
Portfoliohttps://fubits.dev
Blueskyhttps://bsky.app/profile/fubits.dev
GitHubhttps://github.com/fubits1
Twitter@fubits
Oh yeah, Svelte devs in Berlin - join the guild and come to our December meetup https://svelte-berlin.de
Svelte Meetup Berlin

Svelte Meetup Berlin

Svelte Meetup Berlin
fubits (@[email protected])

Attached: 3 images 🤚 Long time no see, but it’s been a work-intense year + JS devs are still sticking to X… Personal news: I decided to quit my current employment towards end of November and will return to fulltime freelancing. Hence, I started to update my portfolio website again, and will be blogging (about web dev, self-hosting, and tech management) somewhen later this year. My current stack: Svelte 5 / SvelteKit, Astro, Supabase, Postgres, and Coolify. (Screens from BlueSky)

Mastodon

Status update from the other side:
- I‘m still sticking to Bluesky for now (mostly because the Svelte community is quite active over there)
- did a bunch of 🤯 async #svelte experiments in #SvelteKit *and* #astro https://fubits.dev/notes/svelte-5-patterns-async-remote/
- there’s so much going on in the Svelte universe, so I compiled some channels + set up a Svelte News RSS feed: https://fubits.dev/notes/how-to-stay-up-to-date-in-svelte/
- I joined the Svelte ambassadors in August 🧡
- gave my „about me“ page an overhaul: https://fubits.dev/about/

1 more update tba

Svelte 5 Patterns (Part 3): Async + Remote

Demos with code snippets / linked REPLs included

fubits Portfolio
@earth_walker I saw your post in the Svelte feed on Bluesky and responded there but didn’t have the AP bridge enabled yet. So here’s my post: https://bsky.app/profile/fubits.dev/post/3m3co7oln2c2r
Ilja (@fubits.dev)

Astro + Svelte is awesome, and working with data became even mightier in the last few weeks. If you go down the Svelte route, feel free to reach out whenever you get stuck! https://bsky.app/profile/fubits.dev/post/3m2cqbxjcvs2g [contains quote post or other embedded content]

Bluesky Social
@snugug @astro @sveltejs the commit for async SSR happened in 5.13.10.
5.14 was just the announcement https://bsky.app/profile/mk.gg/post/3lzl37my5ic2u
Matt Kane (@mk.gg)

That was easy! https://github.com/withastro/astro/pull/14430

Bluesky Social

@snugug @astro @sveltejs I’m not sure if I understand by „server-only component“ but if you omit the boundary in Svelte and omit the client directive in Astro, the Svelte component will run at build time, pre-render and not hydrate on the client.

As in - the async-fetched joke example „without `svelte:boundary` + no client directive?“ further down here is static: https://fubits.dev/svelte-async-ssr/

Test: async Svelte & SSR in Astro - @fubits

Full Stack Developer specializing in Svelte, SvelteKit, Data Visualization, and Technical Project Management for NGOs and startups

fubits Portfolio

@snugug @astro @sveltejs hm, here’s a working example with async fetch and different client directives https://fubits.dev/svelte-async-server-island/

What helped me grok the relationship between Astro and async Svelte was starting with a very minimal example in StackBlitz. Maybe you could create a reproducible example of your bug.

Test: async Svelte & SSR in Astro - @fubits

Full Stack Developer specializing in Svelte, SvelteKit, Data Visualization, and Technical Project Management for NGOs and startups

fubits Portfolio

@snugug @astro @sveltejs that’s a conceptual problem, not an async Svelte one.

Svelte is a frontend framework. Astro is a meta-framework like SvelteKit / Next / Nuxt.
Astro‘s content API belongs in Astro-land.

Frontend in Astro lives in client islands (unless wrapped in Server Islands).

You can only pass entries to Svelte (maybe even as a Promise) as props/children.

And pre-rendering would be tricky.

There’s an experimental API tho https://docs.astro.build/en/reference/container-reference/

Astro Container API (experimental)

Docs

@snugug @astro @sveltejs just to confirm - you are doing that in a *.astro file, right?

And if yes - where is the async Svelte component being imported?

@snugug @astro @sveltejs can you clarify what you mean by „in my script tag“?

async Svelte in Astro works pretty well so far. I’ve tested these constellations and for islands I wrote some lines here: https://fubits.dev/notes/svelte-5-patterns-async-remote/#updates