Skip to content

Commit 578413c

Browse files
committed
Update expo router comparision
1 parent b81b4cb commit 578413c

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

versioned_docs/version-7.x/from-expo-router.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -261,29 +261,29 @@ React Navigation starts with the navigation tree:
261261
| [`router.prefetch`](https://docs.expo.dev/versions/latest/sdk/router/#imperativerouter) | [`navigation.preload`](navigation-object.md#preload) |
262262
| [`useRouter`](https://docs.expo.dev/versions/latest/sdk/router/#userouter) | [`useNavigation`](use-navigation.md) |
263263
| [`useLocalSearchParams`](https://docs.expo.dev/versions/latest/sdk/router/#uselocalsearchparams) | [`useRoute`](use-route.md) and params from the [`route` object](route-object.md) |
264-
| [`useGlobalSearchParams`](https://docs.expo.dev/versions/latest/sdk/router/#useglobalsearchparams) | No direct equivalent. |
264+
| [`useGlobalSearchParams`](https://docs.expo.dev/versions/latest/sdk/router/#useglobalsearchparams) | No direct equivalent. We don't recommend this pattern. |
265265
| [`usePathname`](https://docs.expo.dev/versions/latest/sdk/router/#usepathname) | [`useRoutePath`](use-route-path.md) |
266266
| [`useSegments`](https://docs.expo.dev/versions/latest/sdk/router/#usesegments) | No direct equivalent. |
267267
| [`useFocusEffect`](https://docs.expo.dev/versions/latest/sdk/router/#usefocuseffecteffect-do_not_pass_a_second_prop) | [`useFocusEffect`](use-focus-effect.md) |
268268
| [`useNavigation`](https://docs.expo.dev/versions/latest/sdk/router/#usenavigationparent) | [`useNavigation`](use-navigation.md) |
269269
| [`useSitemap`](https://docs.expo.dev/versions/latest/sdk/router/#usesitemap) | No direct equivalent. |
270270
| [`useLoaderData`](https://docs.expo.dev/router/web/data-loaders) | No direct equivalent, but planned. |
271271

272-
### Features without direct replacements
273-
274-
| Expo Router | Alternative |
275-
| ------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
276-
| [Typed routes](https://docs.expo.dev/router/reference/typed-routes) | [Type inference](typescript.md) from the navigator configuration. |
277-
| [Protected routes](https://docs.expo.dev/router/advanced/protected) | Conditional screens or groups with [`if`](static-configuration.md#if). |
278-
| [Native tabs](https://docs.expo.dev/router/advanced/native-tabs) | Experimental [Native Bottom Tabs](native-bottom-tab-navigator.md) which render native tabs by default on Android & iOS. |
279-
| [Headless tabs from `expo-router/ui`](https://docs.expo.dev/router/advanced/custom-tabs) | Custom [`tabBar`](bottom-tab-navigator.md#tabbar) or [custom navigator](custom-navigators.md). |
280-
| [API routes and server middleware](https://docs.expo.dev/router/web/api-routes) | No direct equivalent. Move this logic to your server. |
281-
| [Server rendering](https://docs.expo.dev/router/web/static-rendering) | [Server rendering](server-rendering.md) with manual setup. |
282-
| [Static rendering](https://docs.expo.dev/router/web/static-rendering) | No direct equivalent. |
283-
| [Link preview and link menu](https://docs.expo.dev/router/reference/link-preview) | Custom UI or platform-specific components. |
284-
| [Zoom transition](https://docs.expo.dev/router/advanced/zoom-transition/) | No direct equivalent, but planned. |
285-
| [`Stack.Header`, `Stack.Toolbar`, `Stack.SearchBar` etc.](https://docs.expo.dev/router/advanced/stack) | Screen options, native stack options, custom headers etc. |
286-
| [`Color`](https://docs.expo.dev/router/reference/color) | [`PlatformColor`](https://reactnative.dev/docs/platformcolor) from React Native, [Material Themes](themes.md#built-in-themes) on Android. |
272+
### Other features
273+
274+
| Expo Router | React Navigation |
275+
| ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |
276+
| [Typed routes](https://docs.expo.dev/router/reference/typed-routes) | [Type inference](typescript.md) from the navigator configuration. |
277+
| [Protected routes](https://docs.expo.dev/router/advanced/protected) | Conditional screens or groups with [`if`](static-configuration.md#if). |
278+
| [Native tabs](https://docs.expo.dev/router/advanced/native-tabs) | Experimental [Native Bottom Tabs](native-bottom-tab-navigator.md) |
279+
| [Headless tabs from `expo-router/ui`](https://docs.expo.dev/router/advanced/custom-tabs) | Custom [`tabBar`](bottom-tab-navigator.md#tabbar) or [custom navigator](custom-navigators.md). |
280+
| [API routes and server middleware](https://docs.expo.dev/router/web/api-routes) | No direct equivalent. Move this logic to your server. |
281+
| [Server rendering](https://docs.expo.dev/router/web/static-rendering) | [Server rendering](server-rendering.md) with manual setup. |
282+
| [Static rendering](https://docs.expo.dev/router/web/static-rendering) | No direct equivalent. |
283+
| [Link preview and link menu](https://docs.expo.dev/router/reference/link-preview) | No direct equivalent, but planned. |
284+
| [Zoom transition](https://docs.expo.dev/router/advanced/zoom-transition/) | No direct equivalent, but planned. |
285+
| [`Stack.Header`, `Stack.Toolbar`, `Stack.SearchBar` etc.](https://docs.expo.dev/router/advanced/stack) | Screen options, native stack options, custom headers etc. |
286+
| [`Color`](https://docs.expo.dev/router/reference/color) | No direct equivalent, but planned. |
287287

288288
## Example setup
289289

versioned_docs/version-8.x/from-expo-router.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ React Navigation starts with the navigation tree:
239239
| --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
240240
| [`app/index.tsx`](https://docs.expo.dev/router/basics/notation) | A screen with `linking: ''`. Auto-detected based on the order or [`initialRouteName`](navigator.md#initial-route-name) |
241241
| [`app/profile/[userId].tsx`](https://docs.expo.dev/router/reference/url-parameters) | A screen with [`linking`](configuring-links.md#mapping-path-to-route-names) such as `profile/:userId` |
242-
| [`app/[...slug].tsx`](https://docs.expo.dev/router/reference/url-parameters) | A screen with [`linking: '*'`](configuring-links.md#handling-unmatched-routes-or-404). |
242+
| [`app/[...slug].tsx`](https://docs.expo.dev/router/reference/url-parameters) | A screen with [`linking: ':slug+'`](configuring-links.md#matching-multiple-path-segments). |
243243
| [`app/+not-found.tsx`](https://docs.expo.dev/router/error-handling/#unmatched-routes) | A screen with [`linking: '*'`](configuring-links.md#handling-unmatched-routes-or-404) |
244244
| [Groups such as `(tabs)`](https://docs.expo.dev/router/basics/navigation-layouts) | [Groups](group.md) in navigator configuration. |
245245
| [`_layout.tsx`](https://docs.expo.dev/router/basics/navigation-layouts) | [Navigator](navigator.md) configuration. |
@@ -268,26 +268,26 @@ React Navigation starts with the navigation tree:
268268
| [`router.prefetch`](https://docs.expo.dev/versions/latest/sdk/router/#imperativerouter) | [`navigation.preload`](navigation-object.md#preload) |
269269
| [`useRouter`](https://docs.expo.dev/versions/latest/sdk/router/#userouter) | [`useNavigation`](use-navigation.md) |
270270
| [`useLocalSearchParams`](https://docs.expo.dev/versions/latest/sdk/router/#uselocalsearchparams) | [`useRoute`](use-route.md) and params from the [`route` object](route-object.md) |
271-
| [`useGlobalSearchParams`](https://docs.expo.dev/versions/latest/sdk/router/#useglobalsearchparams) | No direct equivalent. |
271+
| [`useGlobalSearchParams`](https://docs.expo.dev/versions/latest/sdk/router/#useglobalsearchparams) | No direct equivalent. We don't recommend this pattern. |
272272
| [`usePathname`](https://docs.expo.dev/versions/latest/sdk/router/#usepathname) | [`useRoutePath`](use-route-path.md) |
273273
| [`useSegments`](https://docs.expo.dev/versions/latest/sdk/router/#usesegments) | No direct equivalent. |
274274
| [`useFocusEffect`](https://docs.expo.dev/versions/latest/sdk/router/#usefocuseffecteffect-do_not_pass_a_second_prop) | [`useFocusEffect`](use-focus-effect.md) |
275275
| [`useNavigation`](https://docs.expo.dev/versions/latest/sdk/router/#usenavigationparent) | [`useNavigation`](use-navigation.md) |
276276
| [`useSitemap`](https://docs.expo.dev/versions/latest/sdk/router/#usesitemap) | No direct equivalent. |
277-
| [`useLoaderData`](https://docs.expo.dev/router/web/data-loaders) | No equivalent hook. A screen can define a [loader](data-loading.md) to start fetching on navigation, and read the data from your data fetching library. |
277+
| [`useLoaderData`](https://docs.expo.dev/router/web/data-loaders) | [loader](data-loading.md) for fetching on navigation with your data favorite fetching library. |
278278

279-
### Features without direct replacements
279+
### Other features
280280

281281
| Expo Router | Alternative |
282282
| ------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
283283
| [Typed routes](https://docs.expo.dev/router/reference/typed-routes) | [Type inference](typescript.md#setting-up-the-types) from the navigator and linking configuration. |
284284
| [Protected routes](https://docs.expo.dev/router/advanced/protected) | Conditional screens or groups with [`if`](static-configuration.md#if). |
285-
| [Native tabs](https://docs.expo.dev/router/advanced/native-tabs) | [Bottom tabs](bottom-tab-navigator.md) which render native tabs by default on Android & iOS. |
285+
| [Native tabs](https://docs.expo.dev/router/advanced/native-tabs) | [Bottom tabs](bottom-tab-navigator.md) |
286286
| [Headless tabs from `expo-router/ui`](https://docs.expo.dev/router/advanced/custom-tabs) | Custom [`tabBar`](bottom-tab-navigator.md#tabbar) or [custom navigator](custom-navigators.md). |
287287
| [API routes and server middleware](https://docs.expo.dev/router/web/api-routes) | No direct equivalent. Move this logic to your server. |
288288
| [Server rendering](https://docs.expo.dev/router/web/static-rendering) | [Server rendering](server-rendering.md) with manual setup. |
289289
| [Static rendering](https://docs.expo.dev/router/web/static-rendering) | No direct equivalent. |
290-
| [Link preview and link menu](https://docs.expo.dev/router/reference/link-preview) | Custom UI or platform-specific components. |
290+
| [Link preview and link menu](https://docs.expo.dev/router/reference/link-preview) | No direct equivalent, but planned. |
291291
| [Zoom transition](https://docs.expo.dev/router/advanced/zoom-transition/) | No direct equivalent, but planned. |
292292
| [`Stack.Header`, `Stack.Toolbar`, `Stack.SearchBar` etc.](https://docs.expo.dev/router/advanced/stack) | Screen options, native stack options, custom headers etc. |
293293
| [`Color`](https://docs.expo.dev/router/reference/color) | [`PlatformColor`](https://reactnative.dev/docs/platformcolor) from React Native, [Material Themes](themes.md#built-in-themes) on Android. |

0 commit comments

Comments
 (0)