Comments (4)
Your issue seems quite valid but I can’t think of the exact use case. Can you give me a more complete example, perhaps with some code I can run?
from web.
@ericvicenti @toddpi314 Having the same problem with a navigation structure that roughly looks like this.
Switch Navigator -> Custom Tab Navigator -> Stack Navigator
-> Start - Screen
Switch Navigator
-> Network - Custom Tab Navigator
-> MyHome - Stack Navigator
-> MySearch - Stack Navigator
-> MyShopping - Stack Navigator
-> MyProfile - Stack Navigator
-> Chat - Stack Navigator
-> MySettings - Stack Navigator
Pressing browser back button always triggers a Navigation/NAVIGATE
to the currently active Tab(i.e. Stack Navigator) instead of to the previous Screen on the stack. Like in the following screen shot where I box the Screen in the stack that I should have been taken to:
Let me know if you need more info @ericvicenti . This is roughly what I'm using currently version-wise for native/web(p.s. using react-native-web
and createBrowserApp
for web):
software | version |
---|---|
react-navigation | ^4.0.10 |
@react-navigation/core | 3.6.1 |
@react-navigation/web | ^1.0.0-alpha.9 |
react-navigation-tabs | ^2.7.0 |
react-navigation-stack | ^2.0.15 |
react-native-reanimated | ~1.4.0 |
react-native-gesture-handler | ~1.5.0 |
react-native-screens | 2.0.0-alpha.12 |
react-native-web | ^0.11.7 |
from web.
@ericvicenti It appears that what is really happening is that entire chain of actions is created to direct the User to the screen in the history just before the current one. To simulate going back. However this only works for my:
MyHome - Stack Navigator
MySearch - Stack Navigator
MyShopping - Stack Navigator
The other two Stack Navigators that are being used fail to complete all of the chained navigation actions. Or some of the actions are invalid:
MyProfile - Stack Navigator
MySettings - Stack Navigator
Not sure what to exactly provide. Each navigator is created in the exact same way. Haven't been able to find the culprit in those latter two Stack Navigators that would be causing the back navigation to fail. One thing that does stand out is that the NotificationScreenProfile
route name in one of the actions is not a route that exists in my app.
from web.
@ericvicenti Figured out the NotificationScreenProfile
. We have a separate set of routes where the route names are prefixed with NotificationScreen
for in-app/push notification navigation. So there will be a Profile
and NotificationScreenProfile
named routes that point to the Profile.js
screen. Still not sure how it's picking.
from web.
Related Issues (20)
- goBack
- navigation.dispatch, Go Back Not working HOT 9
- onNavigationStateChange Props is missing HOT 1
- Uncaught DOMException: Failed to execute 'pushState' on 'History' HOT 7
- navigate params are not updating navigation.state.params HOT 3
- Web Auth Flow HOT 5
- add typescript definitions HOT 1
- how to define an index route? HOT 1
- chose between iOS or Android style for createStackNavigator or similar
- Option to disable setting the url and adding to the history (e.g. for modals) HOT 1
- Is this being supported HOT 3
- Non-required files are somehow being included (and called) in bundle
- navigation go back not working on web HOT 7
- query parameters from url not passed to route HOT 3
- pass function into Header or Custom Navigators in react native web? HOT 1
- Hide params from URL HOT 4
- Expo Web App in a Subdirectory Results in Wrong URL HOT 2
- Browser Back Button Not Working as execpted.
- react navigation in web HOT 7
- How can I prevent display: none being appended randomly on my screen by react-navigation ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web.