This and arrow generators would be a nice thing to have.

> On Jul 13, 2015, at 11:42 PM, Matthew Robb <matthewwr...@gmail.com> wrote:
> 
> Are there any proposals or any discussions around solving the problem of 
> instance bound class methods with some sugar?
> 
> There are examples of people doing things like this: 
> https://github.com/reactjs/react-future/blob/master/01%20-%20Core/01%20-%20Classes.js#L31
>  
> <https://github.com/reactjs/react-future/blob/master/01%20-%20Core/01%20-%20Classes.js#L31>
> 
> My proposal would be to extend method shorthand syntax to support the arrow:
> 
> ```
> class A extends React.Component {
>   handleClick(event)=> {
>      ...
>   }
> }
> ```
> Which would be sugar for:
> ```
> class A extends React.Component {
>   handleClick = (event)=> {
>      ...
>   }
> }
> ```
> - Matthew Robb
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to