-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
wrap JSX element attributes in expression #6006
Conversation
@kedromelon, thanks for your PR! By analyzing the history of the files in this pull request, we identified @existentialism, @hzoo and @chicoxyzzy to be potential reviewers. |
@hzoo mentioned in #6004 (comment) that it might be good to document this in the readme -- any suggestions how to give an example of this? Thought about it for a while but couldn't come up with anything that seemed coherent. Also, I added the fixture mentioned in that issue -- are there others that would be good to add as well? (Thanks for the help everyone!) |
…SXExpressionContainer; also adds test fixtures
@kedromelon awesome work! |
Wow nice work 👍! Creative use of checkmarks for the issue description too haha. We don't have to add the example in the readme but figured it could be useful to point out somewhere (maybe in react docs instead) Looking forward to more of your contributions!! |
thanks!! looking forward to contributing more 🙂 good point about the react docs -- I'll see if it makes more sense to document this there |
And maybe we/they didn't want to encourage it 😄 , and given that it's always been a bug seems like no one is using it? |
Adds
JSXAttribute
visitor function in https://github.com/babel/babel/blob/7.0/packages/babel-plugin-transform-react-jsx/src/index.jsIf the value of a
JSXAttribute
is aJSXElement
, wrap it in aJSXExpressionContainer