-
-
Notifications
You must be signed in to change notification settings - Fork 9k
Closed
Description
What problem does this feature solve?
Same feature issue in Vue2 vuejs/vue#12379.
See https://babeljs.io/docs/en/babel-plugin-transform-react-jsx for more details.
We can have a better JSX experience.
Even we can process all the directives/ref/slot features with vue/jsx functions.
Transform original jsx(...) input to vue.h(...)
What does the proposed API look like?
In:
/** @jsxImportSource vue */
const profile = (
<div>
<img src="avatar.png" class="profile" />
<h3>{[user.firstName, user.lastName].join(" ")}</h3>
</div>
)Out:
import { jsx as _jsx } from "vue/jsx-runtime";
import { jsxs as _jsxs } from "vue/jsx-runtime";
const profile = _jsxs("div", {
children: [
_jsx("img", {
src: "avatar.png",
class: "profile",
}),
_jsx("h3", {
children: [user.firstName, user.lastName].join(" "),
}),
],
});Metadata
Metadata
Assignees
Labels
No labels