()
| 2 | import { StyleSheet, Text, TouchableHighlight, View } from 'react-native' |
| 3 | |
| 4 | export default function App() { |
| 5 | const [count, setCount] = useState(0) |
| 6 | |
| 7 | return ( |
| 8 | <View style={styles.container}> |
| 9 | <TouchableHighlight |
| 10 | style={styles.button} |
| 11 | underlayColor="#FAB" |
| 12 | onPress={() => { |
| 13 | setCount(count + 1) |
| 14 | }} |
| 15 | > |
| 16 | <Text style={styles.text}>Press me!</Text> |
| 17 | </TouchableHighlight> |
| 18 | <Text style={styles.text}>{`Pressed ${count} times`}</Text> |
| 19 | </View> |
| 20 | ) |
| 21 | } |
| 22 | |
| 23 | const styles = StyleSheet.create({ |
| 24 | container: { |
nothing calls this directly
no outgoing calls
no test coverage detected