mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 02:44:51 +00:00
15 lines
306 B
Vue
15 lines
306 B
Vue
<script setup>
|
|
const counter = useState('once', () => 0)
|
|
|
|
await callOnce(() => counter.value++)
|
|
await callOnce('same-key', () => counter.value++)
|
|
await callOnce('same-key', () => counter.value++)
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<div>once.vue</div>
|
|
<div>once: {{ counter }}</div>
|
|
</div>
|
|
</template>
|