React Native hook for Back Handler
import useBackHandler from '@rnhooks/back-handler';
function backhandler () {
// ... Custom Setup
}
function App() {
const count = useBackHandler(backhandler);
return (
<View style={styles.container}>
<Text style={styles.type}>{`Count: ${count}`}</Text>
</View>
);
}
Name | Type | Default | Description |
---|---|---|---|
backhandler |
function \ string |
exit |
Either provide with custom back handler method or exit string to exit the app |
Name | Type | Default | Description |
---|---|---|---|
count | Number | 0 |
Back press count |
- @pritishvaidya The main author.
Feel free to contact me or create an issue