GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • ReScript React Native
  • Docs
  • Components
  • APIs
  • Blog
  • GitHub
  • AccessibilityInfo
  • ActionSheetIOS
  • Alert
  • Animated
  • AnimationFrame
  • AppRegistry
  • AppState
  • BackHandler

This view

  • Original page
  • New address

GeezerVison is showing rescript-react-native.github.io — BackHandler | ReScript React Native

Android-only API to listen to the hardware back button.

Methods​

exitApp​

exitApp: unit => unit

addEventListener​

addEventListener: ([#hardwareBackPress], unit => nullable<bool>) => {remove: unit => unit}

Return Nullable.make(true) from the handler to prevent the default back behavior.

React.useEffect0(() => {
let subscription = BackHandler.addEventListener(#hardwareBackPress, () => {
// handle back...
Nullable.make(true)
})
Some(() => subscription.remove())
})
  • Methods
    • exitApp
    • addEventListener
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.