feat(demo): magic reactivity input

This commit is contained in:
Ayo 2023-11-06 16:17:21 +01:00
parent bede8e0057
commit 72925d2dfb

View file

@ -46,7 +46,11 @@
>
<a href="/demo/about">{{ count }}</a>
<div>
<my-hello-world data-name="{{name }}"></my-hello-world>
<my-hello-world id="my-hello" data-name="{{name }}"></my-hello-world>
<input
placeholder="Type your name here"
onkeyup="document.getElementById('my-hello').setAttribute('data-name', this.value)"
/>
</div>
<code-block language="js">const name = "Nitro"</code-block>
<p>some text: {{greeting}}</p>