š šš 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-of⦠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/svā¦š tutorial svelte.dev/tutorial/sveltā¦
Day 2 ā `each` without `as`, for when you just want lots of one thing - docs svelte.dev/docs/svelte/ea⦠- demo svelte.dev/playground/e7eā¦
Day 3 ā you can now export snippets from a <script module> (terms and conditions apply) - docs svelte.dev/docs/svelte/sn⦠- demo svelte.dev/playground/16bā¦
Day 4 ā specify a `defaultValue` on form inputs, and it will be used when the form is reset - docs svelte.dev/docs/svelte/bi⦠- demo svelte.dev/playground/b30ā¦
Day 5 ā it's a three-in-one kind of day! `new MediaQuery(...)` lets you use media queries reactively. prefersReducedMotion is a MediaQuery that helps you respect users' accessibility preferences - docs svelte.dev/docs/svelte/sv⦠- demo svelte.dev/playground/89f⦠there's more!
Day 5, part two ā MediaQuery is powered by createSubscriber, which is an advanced feature mainly for library authors. It makes it easy for you to build your own reactive classes that set up event listeners when something is read inside an effect. - docs svelte.dev/docs/svelte/svā¦
Day 6 āĀ we now have modern state-based Spring and Tween classes for adding motion to your UI, replacing the `spring`/`tweened` stores of old. Smooth! š tutorial svelte.dev/tutorial/svelt⦠š docs svelte.dev/docs/svelte/sv⦠š demo svelte.dev/playground/8a0ā¦
@sveltejs insane feature to have it out of the box, this is awesome