hooks-client.d.ts 968 B

123456789101112131415161718192021
  1. export { FlushEffectsContext, useFlushEffects, } from '../../shared/lib/flush-effects';
  2. /**
  3. * Get the current search params. For example useSearchParams() would return {"foo": "bar"} when ?foo=bar
  4. */
  5. export declare function useSearchParams(): import("../../server/request-meta").NextParsedUrlQuery;
  6. /**
  7. * Get an individual search param. For example useSearchParam("foo") would return "bar" when ?foo=bar
  8. */
  9. export declare function useSearchParam(key: string): string | string[];
  10. /**
  11. * Get the router methods. For example router.push('/dashboard')
  12. */
  13. export declare function useRouter(): import('../../shared/lib/app-router-context').AppRouterInstance;
  14. /**
  15. * Get the current pathname. For example usePathname() on /dashboard?foo=bar would return "/dashboard"
  16. */
  17. export declare function usePathname(): string;
  18. /**
  19. * Get the current segment one level down from the layout.
  20. */
  21. export declare function useSelectedLayoutSegment(parallelRouteKey?: string): string;