react-navigation.github.io
react-navigation.github.io copied to clipboard
Update modal.md
The example shown in the documentation was wrong. The parent stack navigator needs to have its headerMode
prop set to none
. The headerShown
option is irrelevant for this example.
READ ME PLEASE!
TL;DR: Make sure to add your changes to versioned docs
Thanks for opening a PR!
The docs cover several versions of react-navigation
, and in some cases there are several files (for version 1, version 2 and etc.) that all describe a single page of the docs (eg. "Getting Started").
Please make sure that the edit you're making in docs/file-you-edited.md
is also included in the file for the correct version, eg. /versioned_docs/version-3.x/file-you-edited.md
for version 3. If such file doesn't exist, please create it. :+1:
Deploy preview for react-navigation-docs ready!
Built with commit 08e300a674368ee0702c0db76be23b889099e3c7
https://deploy-preview-861--react-navigation-docs.netlify.app
Why is it wrong? The example demonstrates that you have to hide the header only for the screen containing a nested stack. The other screen can still have a header.
I thought this was about opening an full-screen modal, without any header, when navigating to the screen that says "This is a modal", just as it is shown in the gif at the top of the page.
https://reactnavigation.org/assets/images/modal-demo-c21e394139257ff16390d46aa6ba5bc2.gif
I'm only able to accomplish that by setting headerMode="none".
The GIF needs to be updated. The examples are written this way intentionally. So I'm closing this PR.