facebook / jsx

The JSX specification is a XML-like syntax extension to ECMAScript.
http://facebook.github.io/jsx/
1.95k stars 133 forks source link

Feature request: nameless closing tags #152

Open jedwards1211 opened 1 year ago

jedwards1211 commented 1 year ago

I wish I didn't have to write the name in closing tags:

<div>
  <Foo>
    ...
  </>
</>

To me it's just a waste of time. I know IDEs can help with closing tags but such features always get in the way (for example, automatically inserting a closing tag when I'm typing generic type parameters).

So, how about just encouraging Babel/TS to adopt </> as a valid syntax for closing any open tag?

This may be a difference from XML, but so what; the <></> fragment syntax is already not valid XML AFAIK.