Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Parser] jsx fragment shouldn't be a fragment's child #300

Closed
LuoZijun opened this issue Mar 1, 2019 · 4 comments
Closed

[Parser] jsx fragment shouldn't be a fragment's child #300

LuoZijun opened this issue Mar 1, 2019 · 4 comments

Comments

@LuoZijun
Copy link

LuoZijun commented Mar 1, 2019

Spec: https://facebook.github.io/jsx/

Grammar:

JSXFragment :
    < > JSXChildren < / >

JSXChildren :
    JSXChild JSXChildren

JSXChild :
    JSXText
    JSXElement
    { JSXChildExpression }

That's means is say this is not correct ?

<> 
    <App2></App2>
    <> </>
</>
@LuoZijun LuoZijun changed the title jsx fragment shouldn't be a fragment's child [Parser] jsx fragment shouldn't be a fragment's child Mar 1, 2019
@kdy1
Copy link
Member

kdy1 commented Mar 2, 2019

I postponed this issue because babel currently supports

<> 
    <App2></App2>
    <> </>
</>

@koba04
Copy link

koba04 commented Feb 20, 2021

The syntax has been allowed in facebook/jsx#97, but it hasn't been synced to the website yet. facebook/jsx#128
I think it's fine swc allows the syntax, so this issue can be closed.

@kdy1
Copy link
Member

kdy1 commented Feb 20, 2021

Thanks!

@kdy1 kdy1 closed this as completed Feb 20, 2021
@swc-bot
Copy link
Collaborator

swc-bot commented Oct 25, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants