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? |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
-
i think they follow the pattern in a part of that source. |
Beta Was this translation helpful? Give feedback.
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.