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

JSX namespace support #702

Closed
wycats opened this issue Jan 21, 2021 · 5 comments
Closed

JSX namespace support #702

wycats opened this issue Jan 21, 2021 · 5 comments

Comments

@wycats
Copy link

wycats commented Jan 21, 2021

While React doesn't support JSX namespaces, they're explicitly part of the JSX spec. Is there a specific reason that esbuild doesn't parse namespaces?

@evanw
Copy link
Owner

evanw commented Jan 21, 2021

Well React doesn't support them and I'm not aware of anything else supporting them either, so it's not clear to me how they are supposed to be translated to JavaScript. I can certainly parse them and turn them into a prettier syntax error if that's what you mean.

@wycats
Copy link
Author

wycats commented Jan 23, 2021

@evanw non-React JSX implementations could use them in their configured factories. I think the most natural thing to do would be to simply allow the syntax and pass it as a single colon-separated attribute name.

@evanw evanw closed this as completed in 71240d4 Jan 23, 2021
@evanw
Copy link
Owner

evanw commented Jan 26, 2021

This change has been released by the way. It should work in version 0.8.36.

I'm somewhat curious about your use case. Was it something specific? Or just checking for compliance with the spec?

@lifeart
Copy link

lifeart commented Jan 27, 2021

@evanw it’s for glimmer 3 POC, https://github.com/wycats/shimmer

@wycats
Copy link
Author

wycats commented Jan 28, 2021

@lifeart is correct 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants