Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
There is a theoretical difference, but in practice - rather none, except that in one case you define a default import, and in the second a named one.
In theory:
1. The second arrow function works a little differently than the usual one.
2. In the first case, Function Expression, in the second, Function Declaration: what's the difference . Although, here I'm not sure about the context of the import - maybe this is always considered a declaration.
If you answer exactly in the context of React components, then there is no difference in the above code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question