Collapse JSX tag

Convert an empty JSX tag into a self-closing tag.

P42 for VS Code
P42 for GitHub
Collapse JSX tag

Why is this refactoring helpful?

Unnecessary closing elements (with potential whitespace) are additional text that needs to be read and understood. Self-closing elements make the code more concise.


Related Code Assists

Learn More

Available In