mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
6d94158e95
Co-authored-by: Sébastien Chopin <seb@nuxtjs.com>
16 lines
277 B
Vue
16 lines
277 B
Vue
<script setup>
|
|
const counter = useState('counter', () => Math.round(Math.random() * 1000))
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
Counter: {{ counter }}
|
|
<button @click="counter++">
|
|
+
|
|
</button>
|
|
<button @click="counter--">
|
|
-
|
|
</button>
|
|
</div>
|
|
</template>
|