We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92dbceb commit b3d7b6aCopy full SHA for b3d7b6a
src/api/global-api.md
@@ -130,6 +130,17 @@ const MyComponent = defineComponent({
130
})
131
```
132
133
+Or a `setup` function, function name will be used as component name
134
+
135
+```js
136
+import { defineComponent, ref } from 'vue'
137
138
+const HelloWorld = defineComponent(function HelloWorld() {
139
+ const count = ref(0)
140
+ return { count }
141
+})
142
+```
143
144
## defineAsyncComponent
145
146
Creates an async component that will be loaded only when it's necessary.
0 commit comments