Vscode comment jsx error

vscode uses the shortcut key Ctrl+/ to comment a line of jsx code. As shown in the figure below, it will cause an error if it is annotated like this. It is correct to comment as / / . Can this be configured?

clipboard.png


remove the curly braces.

your side has to be understood as pure js, not jsx!

This is how it should be annotated in

jsx. This is just a manual comment for a special scene.

Menu