Discussion Forum | Board Infinity
What is an arrow function and how is it used in React?
Web Development
react
abhinav-nahar
(Abhinav Nahar)
13 August 2021 11:27
1
An arrow function is a short way of writing a function to React.
It is unnecessary to bind
‘this’
inside the constructor when using an arrow function. This prevents bugs caused by the use of
‘this’
in React callbacks.