🎅🎄🎁 ADVENT OF SVELTE 🎅🎄🎁 We're going to ship one thing a day every day from now until Christmas. Wish us luck! svelte.dev/blog/advent-... First up...
Post
Day 1 — error boundaries! Wrap your code in a <svelte:boundary> and you can isolate and recover from unexpected errors. 🎁 docs svelte.dev/docs/svelte/... 🎁 tutorial svelte.dev/tutorial/sve...
13 reposts204 likes
Day 2 — `each` without `as`, for when you just want lots of one thing - docs svelte.dev/docs/svelte/... - demo svelte.dev/playground/e...
A simple variation with named squares on a chessboard svelte.dev/playground/b...
Day 3 — you can now export snippets from a <script module> (terms and conditions apply) - docs svelte.dev/docs/svelte/... - demo svelte.dev/playground/1...
Day 4 — specify a `defaultValue` on form inputs, and it will be used when the form is reset - docs svelte.dev/docs/svelte/... - demo svelte.dev/playground/b...
Day 5 — it's a three-in-one kind of day! `new MediaQuery(...)` lets you use media queries reactively. prefersReducedMotion is an instance of MediaQuery that makes it easier to respect users' accessibility preferences - docs svelte.dev/docs/svelte/... - demo svelte.dev/playground/8... there's more!