facebook / jsx

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

suggest: jsx's close tag name can optional? #107

Closed xp44mm closed 2 years ago

xp44mm commented 6 years ago

Do you want to request a feature or report a bug? feature

What is the current behavior?

<div>
  <p>some text</p>
  <hr/>
</div>

What is the expected behavior? because the html tag always pairs, so if simple write better?

<div>
  <p>some text</>
  <p>some text</p>
  <hr/>
</>

it means that the close tag can be </> also can be </p>.

nojvek commented 4 years ago

This would conflict with jsx fragment syntax i.e <> .... </>. The definition of </> would be overloaded right?

<div><p>some text</><></></>

Is this ^ more readable than ?

<div><p>some text</p><></></div>
Huxpro commented 2 years ago

Personally I felt like we wouldn't pursue in this direction. Feel free to reopen if any one has a strong second opinion on this.