react-native-disable-android-back
Version:
A custom hook that disables the Android back button in React Native when a screen is focused
26 lines (16 loc) • 508 B
Markdown
# React Native Disable Android Back Button
A custom hook that disables the Android back button in React Native when a screen is focused.
## Installation
To install the package, run:
```
npm install --save react-native-disable-android-back
```
## Usage
To use the hook, simply import it into your component and call it:
```js
import useDisableAndroidBackButton from "react-native-disable-android-back";
function MyScreen() {
useDisableAndroidBackButton();
// rest of your component code...
}
```