app-router.client.d.ts 696 B

123456789101112131415
  1. import type { ReactNode } from 'react';
  2. import type { FlightRouterState, FlightData } from '../../server/app-render';
  3. /**
  4. * Fetch the flight data for the provided url. Takes in the current router state to decide what to render server-side.
  5. */
  6. export declare function fetchServerResponse(url: URL, flightRouterState: FlightRouterState, prefetch?: true): Promise<[FlightData: FlightData]>;
  7. /**
  8. * The global router that wraps the application components.
  9. */
  10. export default function AppRouter({ initialTree, initialCanonicalUrl, children, hotReloader, }: {
  11. initialTree: FlightRouterState;
  12. initialCanonicalUrl: string;
  13. children: ReactNode;
  14. hotReloader?: ReactNode;
  15. }): JSX.Element;