Recent versions cannot close empty jsx tags
See original GitHub issueSummary
Recent versions cannot close empty jsx tags
Expected result
<One />
It will help me close the label before, now it won’t work.
Actual result
<One></One>
VS Code Version:
版本: 1.37.1 (user setup)
提交: f06011ac164ae4dc8e753a3fe7f9549844d15e35
日期: 2019-08-15T16:17:55.855Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362
Prettier - Code formatter 2.2.2
OS and version: wind10
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
React component closing tag - Stack Overflow
I can't seem to find information on anything except self-closing tags. I've created a basic tab scroller as a JSFiddle using the self-closing...
Read more >What are React Fragments or the React Empty Tags ... - Medium
This is called the Empty tag in React. This is a shorter syntax for React Fragments. So we can also write the previous...
Read more >Fragments - React
A common pattern in React is for a component to return multiple elements. Fragments let you group a list of children without adding...
Read more >React | PyCharm Documentation - JetBrains
Create an empty PyCharm project. Click Create New Project on the Welcome screen or select File | ...
Read more >Getting started with React - Learn web development | MDN
This brings us to the end of our initial look at React, ... React 17 introduced a new, rewritten version of the JSX...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
VSCode extension for Prettier has no way to fix the behavior for you as it simply calls Prettier core. The only way to get the behavior back is to persuade Prettier core team that self-closing jsx tags need to become configurable. Given their option philosophy, I guess it’s easier to just get used to the new behavior and don’t think of this issue much rather than getting that option. Simplicity brings more benefit in this case compared to ultimate flexibility.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.