G
G
gomerIT2021-01-27 01:59:30
React
gomerIT, 2021-01-27 01:59:30

Is there a difference between how to write components in React function and const name = () => {...}?

Both are considered functional, but is there any difference how to write the code correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Okhotnikov, 2021-01-27
@gomerIT

For React, there is no difference how the function is declared, you can read about the difference between arrow and regular ones here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question