Skip to content

Commit 701c32b

Browse files
committed
Update docs for layout
1 parent f1ab2bc commit 701c32b

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

versioned_docs/version-7.x/group.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ See [Options for screens](screen-options.md) for more details and examples.
225225

226226
### Screen layout
227227

228-
A screen layout is a wrapper around each screen in the group. It makes it easier to provide things such as a common error boundary and suspense fallback for all screens in a group:
228+
A screen layout is a wrapper around each screen in the group. It makes it easier to provide things such as an error boundary and suspense fallback for all screens in the group, or wrap each screen with additional UI.
229+
230+
It takes a function that returns a React element:
229231

230232
<Tabs groupId="config" queryString="config">
231233
<TabItem value="static" label="Static" default>

versioned_docs/version-7.x/navigator.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ function MyStack() {
132132

133133
A layout is a wrapper around the navigator. It can be useful for augmenting the navigators with additional UI with a wrapper.
134134

135-
The difference from adding a wrapper around the navigator manually is that the code in a layout callback has access to the navigator's state, options etc.:
135+
The difference from adding a wrapper around the navigator manually is that the code in a layout callback has access to the navigator's state, options etc.
136+
137+
It takes a function that returns a React element:
136138

137139
<Tabs groupId="config" queryString="config">
138140
<TabItem value="static" label="Static" default>
@@ -242,7 +244,9 @@ Event listeners can be used to subscribe to various events emitted for the scree
242244

243245
### Screen layout
244246

245-
A screen layout is a wrapper around each screen in the navigator. It makes it easier to provide things such as a common error boundary and suspense fallback for all screens in the navigator:
247+
A screen layout is a wrapper around each screen in the navigator. It makes it easier to provide things such as an error boundary and suspense fallback for all screens in the navigator, or wrap each screen with additional UI.
248+
249+
It takes a function that returns a React element:
246250

247251
<Tabs groupId="config" queryString="config">
248252
<TabItem value="static" label="Static" default>

versioned_docs/version-7.x/screen.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,9 @@ By default, React Navigation applies optimizations to screen components to preve
361361

362362
### Layout
363363

364-
A layout is a wrapper around the screen. It makes it easier to provide things such as an error boundary and suspense fallback for a screen:
364+
A layout is a wrapper around the screen. It makes it easier to provide things such as an error boundary and suspense fallback for a screen, or wrap the screen with additional UI.
365+
366+
It takes a function that returns a React element:
365367

366368
<Tabs groupId="config" queryString="config">
367369
<TabItem value="static" label="Static" default>

0 commit comments

Comments
 (0)