JSX & TSX All In One
JSX & TSX All In One
JSX
is an embeddable XML-like
syntax. It is meant to be transformed into valid JavaScript, though the semantics of that transformation are implementation-specific. JSX rose to popularity with the React
framework, but has since seen other implementations
as well. TypeScript supports embedding, type checking, and compiling JSX directly to JavaScript.
In order to use JSX you must do two things.
- Name your files with a
.tsx
extension - Enable the
jsx
option
https://www.typescriptlang.org/docs/handbook/jsx.html
JSX Factory
jsxFactory
https://www.typescriptlang.org/tsconfig#jsxFactory
https://www.typescriptlang.org/tsconfig#jsx
React
https://facebook.github.io/jsx/
https://reactjs.org/docs/introducing-jsx.html
Vue
https://v2.vuejs.org/v2/guide/render-function.html#JSX
https://v2.cn.vuejs.org/v2/guide/render-function.html#JSX
https://vuejs.org/api/sfc-script-setup.html#using-components
https://vuejs.org/guide/extras/render-function.html#jsx-tsx
https://github.com/vuejs/babel-plugin-jsx
https://github.com/vuejs/jsx-vue2
(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!
refs
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/17209133.html
未经授权禁止转载,违者必究!