Function expression #2346
-
I see components created using Function expression, is it gives any benefits? I'm googled but have not found an answer, when using Function declaration inside components it's obvious because of hoisting, but I'm sure there was some real reason to create components in the way it's now. |
Beta Was this translation helpful? Give feedback.
Answered by
frankcalise
Dec 18, 2022
Replies: 1 comment 1 reply
-
One benefit is the |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ryskin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One benefit is the
displayName
is set for the component versus declaring it with an arrow function.