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 https://svelte.dev/tutorial/svelte/tweens
π docs https://svelte.dev/docs/svelte/svelte-motion
π demo https://svelte.dev/playground/8a021b2ec2064230bde4a10b08464876?version=5.8.0
π tutorial https://svelte.dev/tutorial/svelte/tweens
π docs https://svelte.dev/docs/svelte/svelte-motion
π demo https://svelte.dev/playground/8a021b2ec2064230bde4a10b08464876?version=5.8.0
Comments
π https://svelte.dev/tutorial
bind:value={getValue, setValue}
...which lets you transform and validate data
π docs https://svelte.dev/docs/svelte/bind#Function-bindings
π demo https://svelte.dev/playground/1ddd82f573b94201b3c8fcab33bf0a46?version=5.9.0
Should "get" be used only for validation? Or is it ok to change its return value?
Should any mutation/coercion be done only in "set"?
get/set continues to chalk up wins
π demo https://svelte.dev/playground/8095884c1f5040ea846669b904083e25?version=5.10.0
π docs https://svelte.dev/docs/kit/hooks#Shared-hooks-init
π docs https://svelte.dev/docs/svelte/svelte-reactivity-window
π demo https://svelte.dev/playground/8ac86e10fdce485a99c29c95e0092df4?version=5.11.0
Yknow, the way svh and lvh should work. Except they don't in Firefox and many built-in browsers. Mayday!
(Context: https://github.com/mozilla-mobile/firefox-ios/issues/11574#issuecomment-2146095621)
@svelte.dev @rich-harris.dev
π docs https://svelte.dev/docs/kit/hooks#Universal-hooks-transport
π demo https://stackblitz.com/edit/sveltejs-kit-template-default-b5zbxomg?file=src%2Fhooks.js
The same would be nice for `+page.js` and `+layout.ts` load functions.