My opinion on using arrow functions inside React components

With the release of ES6 arrow function syntax, you now can use both regular JavaScript function and arrow function syntax when creating components. I would say that using the arrow function for React components is the right choice for most use cases.

Let’s consider the basics of both syntaxes first. Here’s how you write a normal function:

function sum(x, y){
  return x+y

#react #javascript #es6 #programming #developer

Should You use Arrow Functions in React components?
2.20 GEEK