Circle V2 API Docs
    Preparing search index...

    Module @repo/routes-kit-next

    @repo/routes-kit-next

    @repo/routes-kit-next is the Next.js integration for @repo/route-kit. It exports useRouteParams, a client-side hook that parses next/navigation's useParams() against a Route's Zod params schema. It supports strict (throws on parse failure) and partial parsing modes, and automatically coerces numeric URL segments.

    %%{init:{"theme":"dark"}}%% graph TD routes_kit_next["@repo/routes-kit-next"] --> route_kit["@repo/route-kit"] routes_kit_next -.-> typescript_config["@repo/typescript-config"] routes_kit_next -.-> vitest_config["@repo/vitest-config"]
    %%{init:{"theme":"default"}}%% graph TD routes_kit_next["@repo/routes-kit-next"] --> route_kit["@repo/route-kit"] routes_kit_next -.-> typescript_config["@repo/typescript-config"] routes_kit_next -.-> vitest_config["@repo/vitest-config"]
    graph TD
      routes_kit_next["@repo/routes-kit-next"] --> route_kit["@repo/route-kit"]
      routes_kit_next -.-> typescript_config["@repo/typescript-config"]
      routes_kit_next -.-> vitest_config["@repo/vitest-config"]
    import { useRouteParams } from "@repo/routes-kit-next";
    import { clientRoute } from "~/routes";

    function ClientPage() {
    const { id } = useRouteParams(clientRoute);
    // id is fully typed from the route's Zod schema
    }
    Script Description
    lint Runs Biome check on the package.
    check-types Runs tsc --noEmit to typecheck the package.
    test Runs Vitest with coverage.
    test:watch Runs Vitest in watch mode.

    Functions

    useRouteParams