Skip to content

A navigator can only contain 'Screen', 'Group' or 'React.Fragment' as its direct children #9605

Closed Answered by raajnadar
KingAmo asked this question in Q&A
Discussion options

You must be logged in to vote

React Navigation 7 supports a layout prop for the screen component that can be used to add a wrapper (such as a context provider) for the screen component.

https://reactnavigation.org/docs/7.x/screen/#layout

Reference - #11977 (comment)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@adamhari
Comment options

@andresemartinez
Comment options

Comment options

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