-
Notifications
You must be signed in to change notification settings - Fork 131
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
Consider including difference between <tag> and <Component> in spec #29
Comments
The JSX spec purposely doesn't define semantics. It's meant to be agnostic and |
In practice, JSX implementations which are "React-agnostic" currently special-case the While this remains unspecified, core tooling like eslint & babel are in a bit of a halfway house where React-specific semantics around variables are hard-coded, but not the resulting transform. |
@glenjamin Babel isn't a valid comparison since it specifically targets the React flavour of JSX. |
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed. |
Closed because this is intentional. |
This arose in relation to eslint/eslint#1911
Currently, the spec has a single node type for JSXElementName, which separates three cases: identifier, xml-namespaced identifier, JS member expression identifier.
In the implementation as of 0.12, the semantics of a tag differ depending on the casing of the first character of the identifier.
Could this be incorporated in some way? Perhaps as
JSXComponent
vsJSXIdentifier
orJSXIdentifier
vsJSXTag
. Something to indicate that one should be interpreted as a variable reference, and one as a string literal.The text was updated successfully, but these errors were encountered: