Syntax-sugar for binding state to window or client size?

Is there a syntax-sugar for easily binding state to window size or something? Similar to svelte:
<script>
let clientHeight;
</script>

<div bind:clientHeight={clientHeight} />
<script>
let clientHeight;
</script>

<div bind:clientHeight={clientHeight} />
2 Replies
bigmistqke
bigmistqke7mo ago
no the transform is very minimal. there are directives with which you could make this yourself, but nobody likes using them because typescript support is a bit shitty, so they never really hit off.
Blankeos
BlankeosOP7mo ago
I see. I guess making a hook for it isn't too bad.
Want results from more Discord servers?
Add your server