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

JSX Member expressions not supported in astring #653

Closed
marvinhagemeister opened this issue Jun 2, 2021 · 4 comments · Fixed by #656
Closed

JSX Member expressions not supported in astring #653

marvinhagemeister opened this issue Jun 2, 2021 · 4 comments · Fixed by #656
Assignees
Labels
bug Something isn't working

Comments

@marvinhagemeister
Copy link
Member

Something like:

<Something.Something />

leads to a build error.

@marvinhagemeister marvinhagemeister added the bug Something isn't working label Jun 2, 2021
@marvinhagemeister marvinhagemeister self-assigned this Jun 2, 2021
@Inviz
Copy link
Contributor

Inviz commented Jun 2, 2021

Thanks Marivn

@Inviz
Copy link
Contributor

Inviz commented Jun 2, 2021

Also JSXEmptyExpression

@Inviz
Copy link
Contributor

Inviz commented Jun 2, 2021

	JSXMemberExpression(node, state) {
		this[node.object.type](node.object, state);
		state.write('.');
		state.write(this.Identifier(node.property, state));
	},
	JSXEmptyExpression(node, state) {},

This seemed to help for

<A.B />, <A.B.C.D /> and <>{/*Lol*/}</>

@developit
Copy link
Member

@Inviz that looks correct to me - want to PR it? :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants