Skip to content

Commit 2232d2d

Browse files
docs(mobile): correct the seam fallback's navigation comment
The fallback resolves through Screen's per-route context, so it holds the guarded route's own root-stack navigation, not the navigation container's.
1 parent d2c8618 commit 2232d2d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎apps/mobile/src/Stack.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -820,9 +820,10 @@ function ScreenRenderFallback(props: {
820820
readonly componentStack?: string | undefined;
821821
readonly routeName?: string | undefined;
822822
}) {
823-
// The seam renders OUTSIDE SceneView, so this hook resolves to the root
824-
// navigation container — exactly the stack-level goBack/navigate/popToTop
825-
// the recovery exits need, and it is unaffected by the failed subtree.
823+
// Screen's per-route context wraps the layout, so this hook resolves to
824+
// the guarded root-stack route's own navigation — the same stack the exit
825+
// actions (goBack/navigate/replace) need — and it lives outside the
826+
// failed subtree, so recovery keeps working when the screen cannot render.
826827
const navigation = useNavigation();
827828
const exit = screenFallbackExit({
828829
canGoBack: navigation.canGoBack(),

0 commit comments

Comments
 (0)