You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: versioned_docs/version-7.x/screen.md
+7-1
Original file line number
Diff line number
Diff line change
@@ -218,7 +218,7 @@ This can be done by specifying the `getId` callback. It receives an object with
218
218
<TabItemvalue="static"label="Static"default>
219
219
220
220
```js
221
-
constStack=createNativeStackNavigator({
221
+
constStack=createStackNavigator({
222
222
screens: {
223
223
Profile: {
224
224
screen: ProfileScreen,
@@ -255,6 +255,12 @@ Let's say you have a stack with the history `Home > Profile (userId: bob) > Sett
255
255
256
256
If `getId` is specified in a tab or drawer navigator, the screen will remount if the ID changes.
257
257
258
+
:::warning
259
+
260
+
If you're using [`@react-navigation/native-stack`](native-stack-navigator.md), it doesn't work correctly with the `getId` callback. So it's recommended to avoid using it in that case.
261
+
262
+
:::
263
+
258
264
### Component
259
265
260
266
Each screen must specify a component to render for that route.
0 commit comments