如何在VSCode的.js文件中注释掉JSX代码? [英] How to comment JSX code out in .js files in VSCode?
本文介绍了如何在VSCode的.js文件中注释掉JSX代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
与webstorm不同,我无法在Visual Studio代码的.js
文件中注释掉JSX代码.
Unlike in webstorm, I'm unable to comment JSX code out in .js
files in the Visual Studio Code.
推荐答案
您可以通过{/**/}
You can comment out JSX by {/**/}
示例:
render() {
return (
<div>
<Component1 />
{/* <Component2 /> */}
</div>
)
}
,然后将Component2注释掉
and then Component2 would be commented out
这篇关于如何在VSCode的.js文件中注释掉JSX代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文