Search code examples
react-nativereact-native-webview

How can I prevent going back in react-native-webview?


My app uses react-native-webview and set allowsBackForwardNavigationGestures to true. I want to prevent going back on a specific page. For example, after navigating to the home page from the login page, I want to make sure that I cannot go back. I wonder if blocking back is possible in react-native-webview.

Please help.


Solution

  • I can't be sure but your question sure sounds like a React Navigation issue, particularly concerning Auth. Flow. Well, should that be the case, there's a pretty well written documentation on Auth Flow with good example(s) here

    Hope that helps in solving your issue.