90 minute SvelteKit Crash Course with This Dot Labs
— 2 minute read
I recorded a 90 minute SvelteKit crash course with This Dot Labs where we build a music library app (which I named "Sveltunes"). My goal was to give a overview of everything that makes me excited about SvelteKit, so we cover a lot. Topics include:
directory-based routing, layouts, parameterized routes, and nested routing
loading data with the load function (and how this is more efficient than loading data with onMount)
preloading the data for the next page for snappy navigations
streaming slow data from load functions by returning nested promises
how SvelteKit lets you mix-and-match different rendering options (SSR, CSR, prerendering)
submitting and validating data with form actions
using the enhance helper to progressively enhance forms
implementing optimistic UI
There's a lot we didn't get to, but hopefully this provides a good overview! The code for Sveltunes can be found on GitHub.
If you enjoyed this video, I recommend checking out the slides for the talk I gave at THAT Conference, where I build on the data loading and progressive enhancement concepts to build a nested "Favorite Albums" UI.
In fact, both of my in-person talks last month (the other was at SeattleJS) used the Sveltunes demo, and that was intentional — better to build one demo you can reuse instead of three!
Want to find out when I post a new article? Follow me on Mastodon or Twitter or subscribe to my RSS feed. I also have an email newsletter that I'll send out when I post something new, along with anything else I find interesting.