Home
last modified time | relevance | path

Searched refs:useSegments (Results 1 – 18 of 18) sorted by relevance

/expo/packages/expo-router/build/
H A Dhooks.js6 …Params = exports.useGlobalSearchParams = exports.usePathname = exports.useSegments = exports.useUn…
60 function useSegments() { function
63 exports.useSegments = useSegments;
H A Dexports.d.ts2 …eGlobalHref, usePathname, useGlobalSearchParams, useLocalSearchParams, useSegments, useRootNavigat…
H A Dhooks.d.ts31 export declare function useSegments<TSegments extends string[] = string[]>(): TSegments;
H A Dexports.js3 …= exports.useRootNavigationState = exports.useRootNavigation = exports.useSegments = exports.useLo…
14 …ty(exports, "useSegments", { enumerable: true, get: function () { return hooks_1.useSegments; } });
H A Dhooks.js.map1useSegments` can be typed using an abstract.\n * Consider the following file structure, and strict…
H A Dexports.js.map1 …\n usePathname,\n useGlobalSearchParams,\n useLocalSearchParams,\n useSegments,\n useRootNavi…
/expo/packages/@expo/cli/src/start/server/type-generation/__typetests__/
H A Droute.test.ts5 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 Dexports.ts10 useSegments,
H A Dhooks.ts62 export function useSegments<TSegments extends string[] = string[]>(): TSegments { function
/expo/packages/expo-router/src/__tests__/
H A Dhooks.test.node.tsx6 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 Dhooks.mdx141 <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 Dtyped-routes.mdx74 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 Dtesting.mdx99 …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 Dbasic.ts237 export declare function useSegments<
/expo/packages/expo-router/src/head/
H A DExpoHead.ios.tsx6 import { useLocalSearchParams, useUnstableGlobalHref, usePathname, useSegments } from '../hooks';
207 const cascadingId = urlToId(useSegments().join('-') || '-');
/expo/packages/expo-router/build/head/
H A DExpoHead.ios.js167 const cascadingId = urlToId((0, hooks_1.useSegments)().join('-') || '-');
H A DExpoHead.ios.js.map1useSegments } from '../hooks';\n\nfunction urlToId(url: string) {\n return url.replace(/[^a-zA-Z0…
/expo/docs/pages/router/migrate/
H A Dfrom-react-navigation.mdx283 …. 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…