Searched refs:useSegments (Results 1 – 18 of 18) sorted by relevance
| /expo/packages/expo-router/build/ |
| H A D | hooks.js | 6 …Params = exports.useGlobalSearchParams = exports.usePathname = exports.useSegments = exports.useUn… 60 function useSegments() { function 63 exports.useSegments = useSegments;
|
| H A D | exports.d.ts | 2 …eGlobalHref, usePathname, useGlobalSearchParams, useLocalSearchParams, useSegments, useRootNavigat…
|
| H A D | hooks.d.ts | 31 export declare function useSegments<TSegments extends string[] = string[]>(): TSegments;
|
| H A D | exports.js | 3 …= exports.useRootNavigationState = exports.useRootNavigation = exports.useSegments = exports.useLo… 14 …ty(exports, "useSegments", { enumerable: true, get: function () { return hooks_1.useSegments; } });
|
| H A D | hooks.js.map | 1 …useSegments` can be typed using an abstract.\n * Consider the following file structure, and strict…
|
| H A D | exports.js.map | 1 …\n usePathname,\n useGlobalSearchParams,\n useLocalSearchParams,\n useSegments,\n useRootNavi…
|
| /expo/packages/@expo/cli/src/start/server/type-generation/__typetests__/ |
| H A D | route.test.ts | 5 useSegments, 182 expectType<['apple']>(useSegments<'/apple'>()); 186 expectError(useSegments<'/invalid'>()); 190 expectType<['apple']>(useSegments<['apple']>()); 194 expectError(useSegments<['invalid segment']>());
|
| /expo/packages/expo-router/src/ |
| H A D | exports.ts | 10 useSegments,
|
| H A D | hooks.ts | 62 export function useSegments<TSegments extends string[] = string[]>(): TSegments { function
|
| /expo/packages/expo-router/src/__tests__/ |
| H A D | hooks.test.node.tsx | 6 import { useGlobalSearchParams, useLocalSearchParams, usePathname, useSegments } from '../hooks'; 45 describe(useSegments, () => { 47 const segments = renderHookOnce(() => useSegments()); 52 const segments = renderHookOnce(() => useSegments<['alpha']>()); 56 const segments = renderHookOnce(() => useSegments<['a'] | ['b'] | ['b', 'c']>());
|
| /expo/docs/pages/router/reference/ |
| H A D | hooks.mdx | 141 <APIBox header="useSegments"> 148 import { useSegments } from 'expo-router'; 153 const segments = useSegments(); 162 import { useSegments } from 'expo-router'; 166 const segments = useSegments<['profile'] | ['profile', '[user]']>();
|
| H A D | typed-routes.mdx | 74 You can leverage the `useSegments()` hooks from `expo-router` to create complex relative paths. Con… 87 You can ensure that you push to the same tab by using the `useSegments()` hook to get the first seg… 90 import { Link, useSegments } from 'expo-router'; 96 ] = useSegments();
|
| H A D | testing.mdx | 99 …ments against an array of strings. The matcher uses the value of the [`useSegments`](/router/refer…
|
| /expo/packages/@expo/cli/src/start/server/type-generation/__typetests__/fixtures/ |
| H A D | basic.ts | 237 export declare function useSegments<
|
| /expo/packages/expo-router/src/head/ |
| H A D | ExpoHead.ios.tsx | 6 import { useLocalSearchParams, useUnstableGlobalHref, usePathname, useSegments } from '../hooks'; 207 const cascadingId = urlToId(useSegments().join('-') || '-');
|
| /expo/packages/expo-router/build/head/ |
| H A D | ExpoHead.ios.js | 167 const cascadingId = urlToId((0, hooks_1.useSegments)().join('-') || '-');
|
| H A D | ExpoHead.ios.js.map | 1 …useSegments } from '../hooks';\n\nfunction urlToId(url: string) {\n return url.replace(/[^a-zA-Z0…
|
| /expo/docs/pages/router/migrate/ |
| H A D | from-react-navigation.mdx | 283 …. Use the [`usePathname()`](/router/reference/hooks/#usepathname) or [`useSegments()`](/router/ref… 295 Use the [`usePathname()`](/router/reference/hooks/#usepathname) or [`useSegments()`](/router/refere… 313 Use the [`usePathname()`](/router/reference/hooks/#usepathname), [`useSegments()`](/router/referenc… 445 …e navigation state directly, consider migrating to the `usePathname`, `useSegments`, and `useGloba…
|