How to comment/uncomment jsx (using keyboard `cmd /`) in VSC?

前端 未结 4 733
遇见更好的自我
遇见更好的自我 2021-01-23 08:13

Can anyone tell me how to comment JSX code in VSC?

I looked at the articles listed at the bottom, none of them seem to give a concrete solution, and the ticket appeared

相关标签:
4条回答
  • 2021-01-23 08:43

    Did you try to install React or Babel plugin?

    0 讨论(0)
  • 2021-01-23 08:49

    This might sound dumb but, have you tried re-installing VSCode? Commenting out JSX in a .js file works fine for me without any plugins. (I use windows)

    0 讨论(0)
  • 2021-01-23 08:49

    I was having this issue and for me the problem was the extension Babel ES6/ES7. I've uninstalled that extension.

    If that doesn't help you could try changing the Language Mode to JavaScript React

    0 讨论(0)
  • 2021-01-23 08:51

    Select the text to be commented then press Ctrl+K and Ctrl+C.

    0 讨论(0)
提交回复
热议问题