Comments (9)
The versions mentioned in the issue for the following packages differ from the latest versions on npm:
@react-navigation/native
(found:6.0.2
, latest:6.1.10
)@react-navigation/stack
(found:6.1.1
, latest:6.3.21
)
Can you verify that the issue still exists after upgrading to the latest versions of these packages?
from react-navigation.
Hey @chuckjrussell! Thanks for opening the issue. It seems that the issue doesn't contain a link to a repro.
The best way to get attention to your issue is to provide an easy way for a developer to reproduce the issue.
You can provide a repro using any of the following:
- Expo Snack
- TypeScript Playground
- GitHub repo under your username
A snack link is preferred since it's the easiest way to both create and share a repro. If it's not possible to create a repro using a snack, link to a GitHub repo under your username is a good alternative. Don't link to a branch or specific file etc. as it won't be detected.
Try to keep the repro as small as possible by narrowing down the minimal amount of code needed to reproduce the issue. Don't link to your entire project or a project containing code unrelated to the issue. See "How to create a Minimal, Reproducible Example" for more information.
You can edit your original issue to include a link to the repro, or leave it as a comment. The issue will be closed automatically after a while if you don't provide a repro.
from react-navigation.
I can confirm that this still happens under the latest versions, and that I've attached example code generating the issue
from react-navigation.
I've updated the repro example to be the root of the repo for clarity, here's the link to the StackNavigation in the application https://github.com/chuckjrussell/notetaker/blob/main/src/Navigation.tsx
from react-navigation.
Your navigation files does not include Notes screen inside Stack.Navigator. Can you please try including one more Stack.Screen and adding giving it a Notes screen component and same name as in linking config.
from react-navigation.
Hey there @khagesh thanks for getting back to me! the version of the code in the repo differs from the code pasted up top because the code up top (which includes notes) was a reesult of having trid just about every iteration and example (and removing everything else like authentication etc) to try and diagnose what's going on.
I can assure you that both produce the error I'm seeing, I'm happy to push the changes into the repo if it makes it more straightforward to diagnose, but originally (in the sample code it was intended on being /home?noteId=1
, and over the course of trying different people's implementations, and trying anythign else I could to figure it out, I tried changing names adding a second debug page (hence the Demo
in the code above
from react-navigation.
Of note, in the code provided in the repo, the issue only appeared as not updating the query params, eg
when on /Home
, navigation.navigate("Home", {noteId: 1})
wouldn't update the query string and the url to /Home?noteId=1
, and navigation directly to /Home?noteId=1
would take you directly to /Home
and update the url by removing the params.
During the course of debugging (changing the name to notes, and adding the demo page), I discovered the more general pattern:
- If I added a page, the default landing page wasn't just
/Home
, it was whatever was first screen in the StackNavigator, unless I specified aninitialRouteName
- if I supplied an initial param in the route,
<Stack.Screen name="Home" component={HomeScreen} initialParams={{noteId: 1}} />
when navigating to anything, it would redirect to/Home?noteId=1
I will update my example code and expected behavior to match the code in the repo for clarity sake
from react-navigation.
Repo and example have both been updated to match each other's rotes and names, and I can confirm the issue still exists
from react-navigation.
Update, I've figured out what the issue is, after systematically disabling and console logging, I've discovered that the issue is that React Navigation for Web doesn't allow strict mode. Of course, now that I know what to google, I've found this thread of the same issue, #10988.
from react-navigation.
Related Issues (20)
- Issue unit testing a navigation container (createInteractionHandle is not a function) HOT 4
- Elements with `position: absolute` disappear during screen transition HOT 3
- Crash due to useNativeDriver true for tab animations with android 12 devices HOT 4
- Cannot read property 'name' of undefined in "MaterialTopTabView" HOT 4
- Dropdown and popover components opening at incorrect position in iOS when using default header in React Navigation 6 stack HOT 2
- getState typescript error after version 6.1.10 HOT 2
- Header height not getting calculated in pageY value for components in new architecture HOT 3
- Incorrect pageY value when only using default header of react navigation stack in new architecture HOT 3
- v7 Navigating back randomly causes NAVIGATE action to be dispatched instead of GO_BACK HOT 3
- Possible EventEmitter memory leak detected HOT 2
- Pressable interaction issue with StackNavigator on iPhone Xs + new architecture HOT 8
- 7.0.0-alpha.15 @react-navigation/material-top-tabs - tabBarIcons are not showing. HOT 4
- Adjust the margin of the bottom menu bar HOT 3
- DRAWER ENCERRA O APLICATIVO HOT 10
- Sometimes duplicate tab bar labels appear in bottom tabs HOT 1
- unmountOnBlur shows white screen randomly when switchint tabs HOT 2
- useHeaderHeight changes several times when orientation changes HOT 3
- Navigate into page, increase RAM, navigate back and RAM stays high HOT 1
- When using frosted glass stack to jump in Android mode, ReactNavigation will experience lag and frosted glass will reset HOT 5
- Weird transition in navigation HOT 2
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 react-navigation.