-
Coming back to stack navigators I am always tripping over the fact that nested stack navigators all show their own header. I wonder why is this the default in the first place? Why would that ever be useful in a navigational context? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
@satya164 I think there should be an option to override the stack bar when we nest multiple stack navs? What do you think? |
Beta Was this translation helpful? Give feedback.
-
In majority of cases you'd want to show the header from the child navigator and hide the one from parent since that's the one which will show correct title, have proper animations etc. But since React has one way data flow from parent to child, it's not possible to hide the parent header automatically when there's a header in the child navigator. Hence it needs to be done manually. So it's isn't a case of usefulness, rather feasibility of implementation. |
Beta Was this translation helpful? Give feedback.
In majority of cases you'd want to show the header from the child navigator and hide the one from parent since that's the one which will show correct title, have proper animations etc. But since React has one way data flow from parent to child, it's not possible to hide the parent header automatically when there's a header in the child navigator. Hence it needs to be done manually.
So it's isn't a case of usefulness, rather feasibility of implementation.