xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

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.

  1. Name your files with a .tsx extension
  2. Enable the jsx option

image

https://www.typescriptlang.org/docs/handbook/jsx.html

JSX Factory jsxFactory

https://www.typescriptlang.org/tsconfig#jsxFactory

https://www.typescriptlang.org/tsconfig#jsx

https://babeljs.io/

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, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2023-03-12 21:04  xgqfrms  阅读(12)  评论(0编辑  收藏  举报