Currently we define our class functions like this
class MyClass extends Component {
constructor(props) {
...
this.myFunction = this.myFunction.bind(this);
}
myFunction(args) {
...
}
}
We should instead define our functions like this
class MyClass extends Component {
constructor(props) {
...
}
myFunction: (args) => {
...
}
}
Currently we define our class functions like this
We should instead define our functions like this