question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Header Height jumps with nested navigators

See original GitHub issue

When you have a nested navigators like this: NativeStack -> BottomTabs -> NativeStack, it creates issues when rendering the header from the innermost NativeStack. Only appears to happen when there some other navigator anywhere between two NativeStack ones. For example Stack -> BottomTabs -> NativeStack works correctly and NativeStack -> NativeStack work correctly.

This seems to be the same bug as #540.

https://github.com/dotconnor/ScreensHeader

Expected

Kapture 2020-08-30 at 05 47 11

Actual

Kapture 2020-08-30 at 05 49 15

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:31 (16 by maintainers)

github_iconTop GitHub Comments

4reactions
burakgormekcommented, Sep 9, 2021

@a-eid You have to patch react-navigation PR which is not merged yet. https://github.com/react-navigation/react-navigation/pull/9772

3reactions
burakgormekcommented, Jul 23, 2021

@WoLewicki Thanks for the PR.

I’ve tested with the PR and it fixes header jump but only for vertical. Horizontal jumps looks still there. simplified test: https://snack.expo.dev/IYo_xZr5a

Not know if this is another issue or not connected this issue though.

Container
    Screen: Content
    Screen: SecondStack // Causing the problem. Works normally without this stack.
            Screen: Bottom Tab
                Screen: ChildStack > Content

With SecondStack:

screen1

Without SecondStack:

screen2

Screenshots saved before the navigate transition ends.

With PR vertical jumps gone but horizontal still there:

https://user-images.githubusercontent.com/7578884/126715712-5fb11726-7848-4756-8af6-a8cd9852322e.mp4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Screen options with nested navigators
In this document we'll explain how screen options work when there are multiple navigators. It's important to understand this so that you put...
Read more >
How to navigate between different nested stacks in react ...
Using react navigation, navigate from a screen in a navigator to a screen in a different navigator. More Detail. If I have the...
Read more >
[Solved]-React Navigation get stack header height-React Native
Coding example for the question React Navigation get stack header height-React Native.
Read more >
Intro to Navigation - the Draftbit Docs!
Go to Navigate tab from the top menu bar. · Select the Root Navigator and in the Properties panel, select the Configs tab...
Read more >
React navigation causes screen to flicker with Stack ... - Reddit
Navigator > )} options={{ headerShown: false, tabBarIcon: ({ color }) ... For what it's worth, nesting stack navigators inside a bottom tab ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found