Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Navigation showing blank screen on Windows, when following basic template of Home and Details #10349

Open
3 of 12 tasks
emanuelmartin opened this issue Feb 15, 2022 · 15 comments

Comments

@emanuelmartin
Copy link

emanuelmartin commented Feb 15, 2022

Current behavior

I'm using the basic template code from the guide at https://reactnavigation.org/docs/hello-react-navigation

When I tap to Details, it navigates properly
When I tap to Details... again, it navigates properly
When I tap to Go Back, it shows a blank screen
When I tap to Go to Home, it shows a blank screen
Tried also replacing navigate('Home') with popToTop()

hrsl 2022-02-15 13-20-31

Clean project was created today

Expected behavior

To be able to navigate back, to home, to top or to Home component from Details screen

Reproduction

https://snack.expo.dev/Xu2pvXZKS

Platform

  • Android
  • iOS
  • Web
  • Windows
  • MacOS

Packages

  • @react-navigation/bottom-tabs
  • @react-navigation/drawer
  • @react-navigation/material-bottom-tabs
  • @react-navigation/material-top-tabs
  • @react-navigation/stack
  • @react-navigation/native-stack

Environment

  • I've removed the packages that I don't use
package version
@react-navigation/native 6.0.8
@react-navigation/native-stack 6.5.0
react-native-safe-area-context 3.3.2
react-native-screens 3.11.1
react-native 0.67.0
react-native-windows 0.67.1
node 14.18.0
npm
@github-actions
Copy link

Couldn't find version numbers for the following packages in the issue:

  • @react-navigation/bottom-tabs
  • @react-navigation/drawer
  • @react-navigation/material-bottom-tabs
  • @react-navigation/material-top-tabs
  • @react-navigation/stack

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

@github-actions
Copy link

Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a snack.expo.dev link or link to a GitHub repo under your username).

Can you provide a minimal repro which demonstrates the issue? A repro will help us debug the issue faster. Please try to keep the repro as small as possible and make sure that we can run it without additional setup.

@christopherallis
Copy link

I am also having the same exact issue. Did you ever get passed this, @emanuelmartin?

@christopherallis
Copy link

Here is my own repository with the issue.
https://github.com/christopherallis/barebone-react-navigation-stack-navigator-app

@hasselmann-click
Copy link

hasselmann-click commented Jun 14, 2022

Same issue here with StackNavigator or NativeStackNavigator.

Edit: As a workaround I use @react-navigation v4.x SwitchNavigator with backBehavior: 'order'. There the "back" navigation works as expected.

@daanlenaerts
Copy link

I am having the same problem. Did anyone come up with a solution?

@github-actions
Copy link

Hey! Thanks for opening the issue. Windows and MacOS support in React Navigation is a community effort. We don't have the resources to test and maintain these platforms. Any help with fixing issues on these platforms is appreciated. Please feel free to open a PR to fix the issue.

@Victor0814gui
Copy link

testing it I found that all stack functions work using drawer navigation

@Victor0814gui
Copy link

I still don't know how to inspect the problem, but you can create using a drawer navigation, and hide there using drawerType: 'slide' in screenOptions

@sachin9990
Copy link

@Victor0814gui Can you please provide us with your repo? I too am facing the same issue.

@Victor0814gui
Copy link

Victor0814gui commented Jan 24, 2023

@sachin9990 yes definitely,

@kovacmatic
Copy link

Any progress here?

@daaanigm
Copy link

I had similar problems. I think react navigation doesn't work fine in Windows, I think it is due to uncompatible libraries versions, but I finally I got it working with these dependencies:

 "@react-navigation/drawer": "7.0.0-alpha.1",
 "@react-navigation/native": "6.1.3",
 "@react-navigation/stack": "6.3.12",
 "@types/": "react-navigation/drawer",
 "react": "18.2.0",
 "react-native": "0.72.5",
 "react-native-gesture-handler": "2.9.0",
 "react-native-reanimated": "2.1.0",
 "react-native-safe-area-context": "^4.2.4",
 "react-native-screens": "2.18.1",
 "react-native-windows": "0.72.10"

@Victor0814gui
Copy link

@sachin9990, I apologize for the delay, I completely forgot. Here is the link to a repository https://github.com/Victor0814gui/settings-11-clone. I tested it in debug and release modes, and it works well.

@Victor0814gui
Copy link

I believe this might no longer be necessary as there is a PR that addressed this here: software-mansion/react-native-screens#1890.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants