question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Recent versions cannot close empty jsx tags

See original GitHub issue

Summary

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:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
kachkaevcommented, Aug 29, 2019

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.

0reactions
github-actions[bot]commented, Apr 12, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found