Collapse JSX tag
Convert an empty JSX tag into a self-closing tag.
CleanupP42 for VS Code
P42 for GitHub
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.
- Code Assist ID (for the configuration file):
- You can configure custom keyboard shortcuts with this code action kind:
- This code assist provides refactoring suggestions. Learn how to configure the refactoring suggestion visibility.