mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2024-11-13 02:59:13 +08:00
25 lines
287 B
Markdown
25 lines
287 B
Markdown
# Babel Preset JSX for Vue 3.0
|
|
|
|
To add Vue JSX support.
|
|
|
|
## Syntax
|
|
|
|
functional component
|
|
|
|
```jsx
|
|
const App = () => <div></div>
|
|
```
|
|
|
|
with setup render
|
|
|
|
```jsx
|
|
const App = defineComponent(() => {
|
|
const count = ref(0);
|
|
return () => (
|
|
<div>
|
|
{count.value}
|
|
</div>
|
|
)
|
|
})
|
|
```
|