1
0
Fork 0
mirror of https://github.com/archtechx/alpine-reactive.git synced 2025-12-12 08:24:03 +00:00

Add a second component to the demo

This commit is contained in:
Samuel Štancl 2021-05-17 12:00:14 +02:00
parent fa09e2822f
commit e0e95a48b7

View file

@ -14,6 +14,14 @@
</script>
<h2>First counter</h2>
<div x-data="{ counter: $reactive(window.counter) }">
<button @click="counter.count--">-</button>
Click count: <span x-text="counter.count"></span>
<button @click="counter.count++">+</button>
</div>
<h2>Second counter</h2>
<div x-data="{ counter: $reactive(window.counter) }">
<button @click="counter.count--">-</button>
Click count: <span x-text="counter.count"></span>