Unlike in webstorm, I\'m unable to comment JSX code out in .js
files in the Visual Studio Code.
{/* this works, but only single line */}
In React "{}" allows us to use JavaScript Expressions, so we can comment the way we do in JavaScript.
Example:
{/* multi
line
comment
*/}
{// single line comment
}
Try to disable all plugins, because they can change editor's behaviour. For example if use Babel ES6/ES7 plugin, editor comments .jsx
syntax by //
instead of {/*
. You see see the issue here.
For Linux, For a single line, Use Ctrl + /.
And for multiline, Select the snippets in VSCode Just Hit the Ctrl + Shift + A.
It works. Happy Coding