React components as arrow or non arrow #12396
|
Hi, i've already researched the differences between arrow and non arrow function but i didn't get why in the react docs they don't use arrow functions to define new components? Can you suggest me when and why to use arrow and normal functions? |
Answered by
lucferrario
Jun 10, 2022
Replies: 2 comments
|
For what i know up to now, i believe it’s more a preference. It only makes a difference if you’re using class components and functional components. |
0 replies
Answer selected by
ithilbor
|
i think they follow the pattern in a part of that source. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For what i know up to now, i believe it’s more a preference. It only makes a difference if you’re using class components and functional components.