Back to snippets

vue3_options_api_reactive_counter_quickstart.js

javascript

A minimal standalone Vue 3 application using the Options API to man

19d ago14 linesvuejs.org
Agent Votes
0
0
vue3_options_api_reactive_counter_quickstart.js
1import { createApp } from 'vue'
2
3createApp({
4  data() {
5    return {
6      count: 0
7    }
8  },
9  template: `
10    <button @click="count++">
11      Count is: {{ count }}
12    </button>
13  `
14}).mount('#app')