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

Drawer 5.11.5 doesn't render screens that are navigators (web) #9225

Closed
jpaas opened this issue Jan 15, 2021 · 8 comments
Closed

Drawer 5.11.5 doesn't render screens that are navigators (web) #9225

jpaas opened this issue Jan 15, 2021 · 8 comments

Comments

@jpaas
Copy link
Contributor

jpaas commented Jan 15, 2021

Current Behavior

I have a react-native-web app that uses the drawer view. Many of the screens are navigators.
The latest version of @react-navigation/drawer (5.11.5) does not render any of these screens. It does, but they all appear to have 0 height/width.

Expected Behavior

The drawer screens should all render.

How to reproduce

  • navigation container contains a Drawer.Navigator which has a screen that is a stack navigator.
  • using @react-navigation/drawer 5.11.4 this works
  • upgrade to 5.11.5 and it no longer renders

https://snack.expo.io/@dragonballsy/navdrawer

Your Environment

software version
iOS or Android web
@react-navigation/native 5.9.0
@react-navigation/drawer 5.11.5
react-native-reanimated 1.13.2
react-native-gesture-handler 1.9.0
react-native-safe-area-context 0.7.3
react-native-screens 2.16.1
react-native 0.63.4
expo n/a
node
npm or yarn
@github-actions
Copy link

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

  • @react-navigation/native (found: 5.8.10, latest: 5.9.0)

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

@jpaas
Copy link
Contributor Author

jpaas commented Jan 15, 2021

I tried upgrading to @react-navigation/native 5.9.0 but this gives me a completely different error. One of my components uses useNavigation and this fails with Couldn't find a navigation object. Is your component inside a screen in a navigator?

So until I figure that error out, I can't validate.

@github-actions
Copy link

Hey! Thanks for opening the issue. Can you provide a minimal repro which demonstrates the issue? Posting a snippet of your code in the issue is useful, but it's not usually straightforward to run. A repro will help us debug the issue faster. Please try to keep the repro as small as possible.

The easiest way to provide a repro is on snack.expo.io. If it's not possible to repro it on snack.expo.io, then please provide the repro in a GitHub repository.

@dario30186
Copy link

I have the same problem after upgrading from 5.9.2
With inspect I can see that all the screens in the drawer haven't any height set, but before yes.
If I force the heigth with chrome inspectin my screen container then I can see my screen

@jpaas
Copy link
Contributor Author

jpaas commented Jan 18, 2021

Here's my minimal repro. It shows rendering the same screen, as a bare screen, and then inside a stack navigator. When you navigate to the stack, it all collapses.

https://snack.expo.io/@dragonballsy/navdrawer

@brentvatne
Copy link
Member

similar issue in expo/expo#11644 - worked around it by rolling back to @react-navigation/bottom-tabs@5.11.2

@jpaas
Copy link
Contributor Author

jpaas commented Jan 21, 2021

I've upgraded to @react-navigation/native 5.9.0 but the problem remains. Repro updated to match.

@jpaas
Copy link
Contributor Author

jpaas commented Jan 21, 2021

similar issue in expo/expo#11644 - worked around it by rolling back to @react-navigation/bottom-tabs@5.11.2

@brentvatne I tried rolling back bottom-tabs, but it didn't help. My repro doesn't even use or import that package.

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

Successfully merging a pull request may close this issue.

4 participants