Skip to content
Discussion options

You must be logged in to vote

Hey!

I'm surprised that it's the first time somebody asks and that we haven't documented that in the native stack docs in react-navigation, however setting presentation in useEffect does not make sense and is not supported. The intended presentation for the screen MUST be known at first-render time.

Imagine that after first render, on native side I receive a new screen with presentation: 'push', I push it onto the stack with e.g. UINavigationController, and then, when transition has already been triggered I receive result of another render informing me (native implementation) that you wish to present that screen as formSheet. How should that even look like?

Hence, it is not supported and …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@kkafar
Comment options

Answer selected by SimpleCreations
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants