Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 334 Bytes

File metadata and controls

18 lines (13 loc) · 334 Bytes

react-native-app-helpers/useBackButton

A React hook which executes a given callback when the hardware back button is pressed.

Usage

import { useBackButton } from "react-native-app-helpers";

const ExampleScreen = () => {
  useBackButton(() => {
    alert(`The back button was pressed.`);
  });

  return null;
};