import type { RoutePath, RouteSegments } from '../types'; /** * Returns a list of selected file segments for the currently selected route. Segments are not normalized, * so they will be the same as the file path. For example, `/[id]?id=normal` becomes `["[id]"]`. * * @example * ```tsx app/profile/[user].tsx * import { Text } from 'react-native'; * import { useSegments } from 'expo-router'; * * export default function Route() { * // segments = ["profile", "[user]"] * const segments = useSegments(); * * return Hello; * } * ``` * * * `useSegments` can be typed using an abstract. Consider the following file structure: * * ```md * - app * - [user] * - index.tsx * - followers.tsx * - settings.tsx * ``` * * * This can be strictly typed using the following abstract with `useSegments` hook: * * ```tsx * const [first, second] = useSegments<['settings'] | ['[user]'] | ['[user]', 'followers']>() * ``` */ export declare function useSegments(): RouteSegments; /** * @hidden */ export declare function useSegments>(): TSegments; //# sourceMappingURL=useSegments.d.ts.map