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

Don't treat JSXIdentifier in JSXMemberExpression as HTML tag. Closes #4027 #4765

Merged
merged 2 commits into from Oct 24, 2016
Merged

Don't treat JSXIdentifier in JSXMemberExpression as HTML tag. Closes #4027 #4765

merged 2 commits into from Oct 24, 2016

Conversation

DrewML
Copy link
Member

@DrewML DrewML commented Oct 23, 2016

Note that tests will fail for this PR, because it also depends on the work in #4763 to build a valid AST.

Q A
Bug fix? yes
Breaking change? no
New feature? no
Deprecations? no
Spec compliancy? no
Tests added/pass? yes
Fixed tickets #4027
License MIT
Doc PR reference to the documentation PR, if any

This commit last year made the ReferencedIdentifier virtual type not recognize a JSXIdentifier when it doesn't pass the react.isCompatTag check (which includes verifying the tag does not start with a lowercase letter). This matched the new JSX behavior that Sebastian Markbåge documented, wherein any lowercase JSXIdentifier is treated as an HTML tag.

The problem is that this doesn't take into account the scenario where you have an identifier foo in scope, and your JSX tag is <foo.Bar />. This PR addresses that case.

@danez danez added PR: Bug Fix 🐛 A type of pull request used for our changelog categories reviewed once area: react labels Oct 23, 2016
@hzoo hzoo merged commit 555ee0c into babel:master Oct 24, 2016
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: react outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants