Documentation
    Preparing search index...

    Hooks executed by the dev server around the router. These hooks provide lifecycle management for route scanning and processing.

    const routerHooks: RouterHooks = {
    routesCommitted: [
    () => import('./hooks/on_routes_committed')
    ],
    routesScanning: [
    () => import('./hooks/before_routes_scan')
    ],
    routesScanned: [
    () => import('./hooks/after_routes_scan')
    ]
    }
    type RouterHooks = {
        routesCommitted: LazyImport<
            (
                parent: DevServer,
                routes: Record<string, RoutesListItem[]>,
            ) => AsyncOrSync<void>,
        >[];
        routesScanning: LazyImport<
            (parent: DevServer, routesScanner: RoutesScanner) => AsyncOrSync<void>,
        >[];
        routesScanned: LazyImport<
            (parent: DevServer, routesScanner: RoutesScanner) => AsyncOrSync<void>,
        >[];
    }
    Index

    Properties

    routesCommitted: LazyImport<
        (
            parent: DevServer,
            routes: Record<string, RoutesListItem[]>,
        ) => AsyncOrSync<void>,
    >[]

    The hook is executed when routes are committed by the dev server child process. Use this hook to react to route changes and perform related tasks.

    The DevServer instance

    Record of routes grouped by domain or method

    routesScanning: LazyImport<
        (parent: DevServer, routesScanner: RoutesScanner) => AsyncOrSync<void>,
    >[]

    The hook is executed when dev server begins the routes scanning process. Use this hook to prepare for route scanning or modify scanner configuration.

    The DevServer instance

    The RoutesScanner instance being used

    routesScanned: LazyImport<
        (parent: DevServer, routesScanner: RoutesScanner) => AsyncOrSync<void>,
    >[]

    The hook is executed when routes scanning process has finished. Use this hook to process the scanned routes or clean up resources.

    The DevServer instance

    The RoutesScanner instance that was used