bedward
1
I’ve seen in curriculum, that you can use the following syntax when declaring a method:
this.myFunction = this.myFunction .bind(this)
//then you declare the function below
myFunction(){
return "hello world!"
}
but I’ve seen another method when you don’t bind the function like so:
myFunction = () => {
return "hello world!"
}
This is true. Those are two ways to write a function. What exactly is your question?
bedward
3
I am talking about react,
jsdisco
4
2 Likes