Can someone explain to me, or direct me to some documentation that describes the differences in the following implementations?
I can't wrap my head around when to use which style of some custom function.
From what I can understand A and B are roughly the same, but ES6 allows arrow functions. Is there a reason to use one of the other. How does C fit in?
const solutionA = () => {
return <p>A Text</p>
}
function solutionB(){
return <p>B Text</p>
}
const solutionC = (
<p>C Text</p>
)
C Text
)`, otherwise it is just a variable holding that value – iunfixit Sep 10 '21 at 19:15