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

js-beautify -X breaks code with jsx spread attributes #734

Closed
alexbyk opened this issue Jul 15, 2015 · 2 comments
Closed

js-beautify -X breaks code with jsx spread attributes #734

alexbyk opened this issue Jul 15, 2015 · 2 comments
Milestone

Comments

@alexbyk
Copy link

alexbyk commented Jul 15, 2015

This:

let props = { foo: "default" };
let component = <Component {...props} foo={'override'} />;
console.log(component.props.foo);

becomes:

let props = {
  foo: "default"
};
let component = < Component {...props
}
foo = {
  'override'
}
/>;
console.log(component.props.foo);

while without {...props}:

let props = { foo: "default" };
let component = <Component foo={'override'} />;
console.log(component.props.foo);

works as expected

@bitwiseman
Copy link
Member

Excellent issue report. Will fix soon.

@bitwiseman bitwiseman added this to the v1.6.0 milestone Jul 20, 2015
@bitwiseman
Copy link
Member

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants