[Solved] React Native difference between nested arrow function and normal arrow function


The second one is invalid.

The prototype of an arrow functions is the following :

variableName = (arguments) => {
    Body
}

Your onPress should be : onPress = {() => this.pick(curJob,i)}>, otherwise, the function is called everytime a render happens, so always. With the () => before, you are telling the program to run this.pick only onPress

solved React Native difference between nested arrow function and normal arrow function