Skip to content

Instantly share code, notes, and snippets.

@akinkarayun
Created February 5, 2024 19:41
Show Gist options
  • Save akinkarayun/b4e911e702c4d92d2e0f88a1038b52fa to your computer and use it in GitHub Desktop.
Save akinkarayun/b4e911e702c4d92d2e0f88a1038b52fa to your computer and use it in GitHub Desktop.
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