-
-
Save amandeepmittal/23dacdb1f9dcb1b9052d3bcbc6535502 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function App() { | |
const [count, setCount] = useState(0); | |
function buttonClickHandler() { | |
setCount(count + 1); | |
} | |
return ( | |
<View style={styles.container}> | |
<Text>You clicked {count} times.</Text> | |
<Button | |
onPress={buttonClickHandler} | |
title="Click me" | |
color="red" | |
accessibilityLabel="Click this button to increase count" | |
/> | |
</View> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment