Day 11 โ a whole new module, for getting reactive views of window properties like innerWidth, innerHeight, scrollX, scrollY and so on. Like the bindings on but with less boilerplate
๐ docs https://svelte.dev/docs/svelte/svelte-reactivity-window
๐ demo https://svelte.dev/playground/8ac86e10fdce485a99c29c95e0092df4?version=5.11.0
๐ docs https://svelte.dev/docs/svelte/svelte-reactivity-window
๐ demo https://svelte.dev/playground/8ac86e10fdce485a99c29c95e0092df4?version=5.11.0
Comments
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
also, encode/decode are shorter
๐ docs https://svelte.dev/docs/llms
๐ demo (a snake game made by Sonnet 3.5) https://svelte.dev/playground/0de3c1c1a31d47bdbb7c4aa3477a6b46
๐ docs https://svelte.dev/docs/svelte/imperative-component-api#unmount
๐ demo https://svelte.dev/playground/a4ca332691204ccd887ec7b1df818182?version=5.13.0
๐ docs https://svelte.dev/docs/svelte/$inspect#$inspect.trace()
๐ demo https://svelte.dev/playground/d135c6f00beb4fa391725e59d8061604?version=5.14.0
๐ docs https://svelte.dev/docs/kit/$app-state
๐ tutorial https://svelte.dev/tutorial/kit/page-state
npx sv migrate app-state