web
web copied to clipboard
Browser Back Button Not Working as execpted.
Hi, I am using
"@react-navigation/web": "^1.0.0-alpha.9",
"react": "16.9.0",
"react-native-web": "0.11.7",
"react-navigation": "^4.4.0",
"react-navigation-stack": "^2.8.2",
"react-navigation-tabs": "^2.9.0",
I am facing below problems.
- For some screens the browser bak buttons work perfectly.
- For some other screen, After pressing the browser back buttons also it will remain on the same screen.
- For some other screen, the browser back button should press more than once(2-3) to go back.
This behavior is not constant i.e. it will change randomly from screen to screen.
I have referred this to handle browser back buttons https://www.youtube.com/watch?v=Czih6w57P9A i.e.
import { createBrowserApp } from '@react-navigation/web'
import { createAppContainer } from 'react-navigation'
const Navigator = Platform.OS === 'web' ? createBrowserApp(config, { history: 'hash' }) : createAppContainer(config)
Can you help me out? Thanks.