Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix comment syntax inside jsx #7674

Closed
wants to merge 3 commits into from

Conversation

goodmind
Copy link
Contributor

@goodmind goodmind commented Apr 26, 2019

Temporary workaround for #7672

function Component<T>(props: {|type: T|}) {
  return null
}

const el = <Component /*::type={1}*/ />

@gabelevi
Copy link
Contributor

What's the use case for this? Has this been requested?

@goodmind
Copy link
Contributor Author

goodmind commented Apr 26, 2019

@gabelevi isn't it more consistent for comment syntax to work everywhere?

@goodmind
Copy link
Contributor Author

@gabelevi I updated main post

Copy link
Contributor

@gabelevi gabelevi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good to me!

A lot of the code looks copy/pasted. Can you move it into a helper function?

@goodmind goodmind requested a review from gabelevi April 30, 2019 00:22
@goodmind
Copy link
Contributor Author

goodmind commented Apr 30, 2019

I can't test it now, but I'm not sure if this would be allowed too?

</*::Test*/ />

If it is, I would like to disallow it probably

@goodmind
Copy link
Contributor Author

goodmind commented Jun 4, 2019

@gabelevi I'm going to close it because I'm not really want to introduce some unexpected behaviour here with jsx, also I think this is not worth it

@goodmind goodmind closed this Jun 4, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants