class ExampleClass{
constructor(){
}
method1 = () =>{
/* code
*/
}
}
For the above code I get error
method1 = () => {`
^
SyntaxError: Unexpected token =
There is no native support for class instance fields just yet. Your best option at the minute is to use a transpiler like Babel which does have support for this syntax.
=. check Classesthis.method1 = () => {}instead, but I dont know if that's the best choice.