Answers for "view onpress react native"

1

view onpress react native

// View does not support on press event, instead, use touchable components
// that support this prop
// Example:
<TouchableOpacity onPress={onPressFunction}>
	<>
		// Elements with onpress event
	</>
</TouchableOpacity>
Posted by: Guest on August-05-2021
0

ReactNative onPress doesn't exist

<TouchableOpacity style={{backgroundColor: "red", padding: 20}} onPress={()=> {
    console.log('does not work');
    }
  }>
  <Text>X</Text>
</TouchableOpacity>
Posted by: Guest on May-27-2020

Code answers related to "view onpress react native"

Code answers related to "Javascript"

Browse Popular Code Answers by Language