Skip to content

Commit 40e4152

Browse files
authored
day 11 (#989)
1 parent 645ddef commit 40e4152

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

apps/svelte.dev/content/blog/2024-12-01-advent-of-svelte.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,12 @@ A lot of you wanted a place to put asynchronous setup work that happens before y
8383

8484
- [docs](https://svelte.dev/docs/kit/hooks#Shared-hooks-init)
8585

86-
## Day 11
86+
## Day 11: `svelte/reactivity/window`
8787

88-
Coming soon!
88+
Today we added a whole new module. `svelte/reactivity/window` exports a variety of reactive values like `innerWidth`, `innerHeight`, `scrollX`, `scrollY` and so on. Like the `MediaQuery` introduced on day 5 and `Spring` and `Tween` from day 6, these are class instances with a reactive `current` property that you can use in your template and in deriveds/effects. Behind the scenes, Svelte handles all the event listener stuff.
89+
90+
- [docs](/docs/svelte/svelte-reactivity-window)
91+
- [demo](/playground/8ac86e10fdce485a99c29c95e0092df4?version=5.11.0)
8992

9093
## Day 12
9194

packages/site-kit/src/lib/codemirror/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ export function completion_for_javascript(context, selected, files) {
245245
'svelte/legacy',
246246
'svelte/motion',
247247
'svelte/reactivity',
248+
'svelte/reactivity/window',
248249
'svelte/store',
249250
'svelte/transition'
250251
];

0 commit comments

Comments
 (0)