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 32b8ee5 commit 9c9bf35Copy full SHA for 9c9bf35
README.md
@@ -40,19 +40,14 @@ export default <Comp foo={foo} />
40
2. ✅ Use the `defineComponent` macro from [@vue-macros/jsx-macros](https://github.com/vue-macros/vue-macros/pull/794) to wrapping.
41
42
```tsx
43
-defineComponent(({ foo }) => {
44
- return <div>{ foo }<div>
+const Comp = defineComponent(({ foo }) => {
+ return <>{foo}</>
45
})
46
-```
47
48
-```tsx
49
-function Comp({ foo }) {
50
- return <div>{foo}</div>
51
-}
52
// Will be convert to:
53
-function Comp(_ctx0) {
54
- return <div>{_ctx0.foo}</div>
55
+const Comp = defineComponent((_props) => {
+ return <>{_props.foo}</>
+}, { props: ['foo'] })
56
57
const foo = ref('foo')
58
export default <Comp foo={foo.value} />
0 commit comments