From f41ed51a9a435410c06300a28e34ef59fd26d7e1 Mon Sep 17 00:00:00 2001 From: Frank Calise Date: Fri, 17 May 2024 10:49:07 -0400 Subject: [PATCH] fix(expo-router): add gesture handler root view provider (#160) --- docs/recipes/ExpoRouter.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/recipes/ExpoRouter.md b/docs/recipes/ExpoRouter.md index bcce6c22..9240a526 100644 --- a/docs/recipes/ExpoRouter.md +++ b/docs/recipes/ExpoRouter.md @@ -242,7 +242,9 @@ We're now ready to start setting up navigation for the app! If you're familiar w ```tsx // app/_layout.tsx import React from "react"; +import { ViewStyle } from "react-native" import { Slot, SplashScreen } from "expo-router"; +import { GestureHandlerRootView } from "react-native-gesture-handler" import { useInitialRootStore } from "src/models"; SplashScreen.preventAutoHideAsync(); @@ -264,8 +266,14 @@ export default function Root() { return null; } - return ; + return ( + + + + ) } + +const $root: ViewStyle = { flex: 1 } ``` Move `ErrorBoundary` out of `screens/ErrorScreen` and into `src/components/ErrorBoundary`: