Skip to content

Instantly share code, notes, and snippets.

@mpeg
Created July 28, 2021 17:34
Show Gist options
  • Save mpeg/caa69f825c4403f9dd3d44ef927cf3a7 to your computer and use it in GitHub Desktop.
Save mpeg/caa69f825c4403f9dd3d44ef927cf3a7 to your computer and use it in GitHub Desktop.
<let/div_width=0 />
<lifecycle onMount() {
const el = getEl()
div_width = el.clientWidth
} />
<div/getEl>
<h1>Test</h1>
</div>
<return={
div_width
} />
<child/ret />
<effect() { console.log(ret) } />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment