-
-
Save akinkarayun/b4e911e702c4d92d2e0f88a1038b52fa 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
import React from 'react'; | |
import { Button, View, StyleSheet } from 'react-native'; | |
import useCountdownTimer from "./components/useCountdownTimer"; | |
const App = () => { | |
const { resetTimer } = useCountdownTimer(); | |
return ( | |
<View style={styles.container}> | |
<Button title="Restart Timer" onPress={() => resetTimer(600)} /> // you can give the value for timer based on your need | |
</View> | |
); | |
}; | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
alignItems: 'center', | |
justifyContent: 'center', | |
backgroundColor: '#ecf0f1', | |
}, | |
}); | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment