S
SolidJS•2mo ago
Blankeos

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 🌈
bigmistqke 🌈•2mo 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
Blankeos•5w ago
I see. I guess making a hook for it isn't too bad.