How to use JSX in a script? #13069
Answered
by
jh-leong
PeiTianHuang
asked this question in
Help/Questions
-
Beta Was this translation helpful? Give feedback.
Answered by
jh-leong
Mar 19, 2025
Replies: 1 comment 1 reply
-
To use JSX in your script, you need to declare the pre-processor language as -<script setup lang="ts">
+<script setup lang="tsx"> |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Alfred-Skyblue
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To use JSX in your script, you need to declare the pre-processor language as
tsx
orjsx
using thelang
attribute. Here's an example: Playground