1// View does not support on press event, instead, use touchable components
2// that support this prop
3// Example:
4<TouchableOpacity onPress={onPressFunction}>
5 <>
6 // Elements with onpress event
7 </>
8</TouchableOpacity>
1<TouchableOpacity style={{backgroundColor: "red", padding: 20}} onPress={()=> {
2 console.log('does not work');
3 }
4 }>
5 <Text>X</Text>
6</TouchableOpacity>
7