React.JS - Normal Functions or Arrow Functions in Functional Components

Viewed 162

Today in React it is much more common to use functional components with React hooks rather then class components. I am wondering, though, whether or not it is better to use a normal function or error function when creating a react component in a functional component.

For example, this:

// normal function
function MyComponent(props) {
 ...
}

or this:

// arror function
const MyComponent = (props) => {
 ...
}

There are discussions of this question before as relate to class components, but I was not able to find any information with regards to functional components.

I am wondering, therefore, what are the advantages and disadvantages of each approach. Please note, I'm not looking for personal preference, but rather factual differences and/or benefits of one approach over the other.

Any thoughts?

0 Answers
Related