Handle browser back button

I am trying to port a react-native app to run on web. Is there a recommended way to handle back button press on the browser? I’m using stackednavigator from ‘react-navigation’

1 Like

Do you mean the hardware back button on Android devices? There is this API

You need to use createBrowserApp to link up the back handler. Here is an example tutorial https://www.youtube.com/watch?v=Czih6w57P9A

1 Like

Got it working. Thanks!