I've noticed that sometimes a function callback is passed to a component it takes two forms:
<Component onPress={() => handleSomething} />
<AnotherComponent onPress={(val) => handleValue(val)} />
and sometimes:
<Component onPress={handleSomething} />
<AnotherComponent onPress={handleValue(val)} />
Within functional components, is the arrow function version the same as directly calling the function? If not, what are the differences or when one would use them?
Thanks