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

Update docs with example for Babel 7 -- JSX allows elements as attribute values? #10276

Closed
noahlemen opened this issue Jul 26, 2017 · 3 comments

Comments

@noahlemen
Copy link
Member

noahlemen commented Jul 26, 2017

babel/babel#6004 was resolved via babel/babel#6006, so as of Babel 7 <div attr=<div /> /> will work.

Should an example of this be added in the React documentation? If so, where? Would JSX In Depth be appropriate?

@bvaughn
Copy link
Contributor

bvaughn commented Jul 26, 2017

Personally I don't think this needs to be in the React docs. (And at least some syntax highlighters- like the Babel plugin for Sublime- don't handle nested elements like this without the wrapping {}s. Atom seems okay with it though.)

But I don't have a strong feeling on this so I'll defer to others.

@gaearon
Copy link
Collaborator

gaearon commented Jul 26, 2017

I also don't feel this is important enough to document. Note that we already document the pattern itself, just not the form that omits curlies.

@gaearon gaearon closed this as completed Jul 26, 2017
@noahlemen
Copy link
Member Author

makes sense, thanks!

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

No branches or pull requests

3 participants