babel-plugin-jsx-采用

时间:2024-02-20 20:00:32
【文件属性】:

文件名称:babel-plugin-jsx-采用

文件大小:31KB

文件格式:ZIP

更新时间:2024-02-20 20:00:32

react babel jsx babel-plugin Babel

babel-plugin-jsx-采用 这个插件转换adopt调用来渲染道具。 基于想法。 :warning_selector: 实验性的:您可能要编写的代码应该进行正确的转换,可能尚不涉及卷积/边缘情况。 例 输入值 const Example = ( ) => { const theme = adopt ( < Theme> ) const counter = adopt ( < Counter> ) const toggle = adopt ( < Toggle> ) return ( < div xss=removed xss=removed> < span> { `Count: ${ counter } ` } < / span > < button onClick = { toggle } > { 'Toggle' } < / button > < / div > ) } 输出量 const Example = ( )


【文件预览】:
babel-plugin-jsx-adopt-master
----.babelrc(145B)
----.lintstagedrc(229B)
----package.json(2KB)
----test()
--------index.js(73B)
--------fixtures()
----jest.config.js(131B)
----src()
--------index.js(6KB)
----.gitignore(17B)
----.npmrc(19B)
----README.md(2KB)

网友评论