How to know if the current screen is within a presentation modal? #10420
Unanswered
KishoreBarik
asked this question in
Q&A
Replies: 3 comments
-
|
sounds like a very good question, especially with the native stack. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Also curious, this is useful for managing the status bar and safe area differently on screens which are sometimes a modal. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
With react-navigation there is a type field that you can access that will tell you if you are looking at a tab, stack etc... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a use case where the screen component is being used in normal presentation as well as within a modal presentation flow(Parent to Parent stack is modal). How can I determine (using the library help) if the screen is within a modal or not.
I see
ModalPresentationContextis there in Stack navigator, but this is not exported. Also there are some other functions likegetIsModalwhich makes use ofscene.descriptor.optionsto determine the same. But neither of them is exposed.Beta Was this translation helpful? Give feedback.
All reactions