IssueRaiser

support object literal property value shorthand

side note : following the issue facebook/react/issues/2536 what I'd like to be able to do with jsx is this : ``` javascript {this.state.list.map((item, key) => <MyComponent {item, key} />)} ``` I know it's not to be considered a big syntax issue, its just sugar, but it seems logical to me that after supporting the spread operator, as this other ES6 feature is supported by jstransform/jsx as @sebmarkbage said in the related react issue, the `<Foo item />` syntax is supported for boolean attributes, but IMO ``` javascript var item = "value" return <Foo {item}/> ``` isn't that confusing as it is going to get supported by various browsers soon, and developers will have to know it. so now, I think it's all about discussing this proposal :smile:

Posted by bloodyowl on Nov 27, 2014, 9:31 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.9,000 issues0 comments

support (Other)

support object literal property value shorthand

bloodyowlNov 27, 2014, 9:31 PM

side note : following the issue facebook/react/issues/2536 what I'd like to be able to do with jsx is this : ``` javascript {this.state.list.map((item, key) => <MyComponent {item, key} />)} ``` I know it's not to be considered a big syntax issue, its just sugar, but it seems logical to me that after supporting the spread operator, as this other ES6 feature is supported by jstransform/jsx as @sebmarkbage said in the related react issue, the `<Foo item />` syntax is supported for boolean attributes, but IMO ``` javascript var item = "value" return <Foo {item}/> ``` isn't that confusing as it is going to get supported by various browsers soon, and developers will have to know it. so now, I think it's all about discussing this proposal :smile:

Comments (0)

No comments yet. Start the discussion.

Comment on this issue