Answer the question
In order to leave comments, you need to log in
What is the difference in method declaration?
class TripHistory extends Component {
scrollHandler = throttle((e) => {
console.log(e);
}, 300);
}
class TripHistory extends Component {
constructor(){
super(props);
this.scrollHandler = throttle(this.scrollHandler,300)
}
scrollHandler = (e) => {
console.log(e);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question