react-native - onPressIn Event not working on component TextInput

Viewed 136

This code below is example from react native documentation, the problem is onPressIn does not work as expected, do I understand the meaning of onPressIn event or there is ongoing problem with onPressIn and OnPressOut event listeners, on component TextInput.

Expo Snack - Here

1 Answers

Solution: change onPressin on onPressIn (capital letter I). The next error I noticed was at: const [number, onChangeNumber] = React.useState(null); the initial value should not be null but as suggests reac-native docs "string" . I suggest you just put an empty string there.

Related