I am learning react and in some videos the lecturers use function like this in their component.
function(){}
and sometimes they use arrow function like this
function=()=>{}
what are the different between these two? whenever I use function(){} I cannot call any props from state so I always use arrow function and it works very well.
thisbinding, which addresses your question. Just want to share one good article to you reactarmory.com/answers/when-to-use-arrow-functions