3 ms·
Arrow functions aren't just new syntax, they keep the context in which they are declared. It allows devs to do the following: onClick={() => doSomething()} W
by dntrkv 7y ago
Arrow functions aren't just new syntax, they keep the context in which they are declared.
It allows devs to do the following:
onClick={() => doSomething()}
Without having to worry about binding the function to the correct context.