You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'd like to be able to parse <foo .bar={this.bar} @baz={this.baz} />, along with similar constructs. Currently, a JSXIdentifier cannot begin (or even contain) these symbols.
Describe the solution you'd like
An update to the parser. I can attempt to create a PR if someone can point me in the right direction.
Describe alternatives you've considered
Aside from forking the parser permanently, I don't believe there are any alternatives.
Teachability, Documentation, Adoption, Migration Strategy
This could be used for plugins like jsx-lit-html, which transforms JSX into Lit-HTML syntax. Currently, the plugin has to take a different approach that is dissimilar to Lit's syntax. I was hoping to create a similar plugin, but realized I can't even parse my proposed syntax (this being the only reason).
I don't know how closely Babel follows Facebook's current JSX spec (link). If wanted, I can file an issue there as well. I know JSX was originally created for React, but it's used by far more than just that nowadays, and this syntax change would expand the use cases even further.
Hey @jhpratt! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.
Activity
babel-bot commentedon May 6, 2019
Hey @jhpratt! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.
nicolo-ribaudo commentedon May 6, 2019
Yeah, this should first be discussed in the JSX spec repository
jhpratt commentedon May 6, 2019
Looks like this was already proposed in react/jsx#66 back in 2016, but was neither accepted nor declined. I've just added a comment seeking an update.
jhpratt commentedon May 8, 2019
@nicolo-ribaudo I presume if no response occurs on the JSX repo, that would mean this issue is a dead end, yes?
nicolo-ribaudo commentedon Sep 2, 2019
I'm closing this issue, since it first needs to be implemented in the spec (react/jsx#66)