Skip to content

v2.2.2-rc.3

Pre-release
Pre-release
Compare
Choose a tag to compare
@tatethurston tatethurston released this 20 Sep 04:24
· 7 commits to main since this release
c917293

2.2.2-rc.3

  • Adds support for Next.js's app directory. Link accepts either static routes (no url parameters) or a RouteLiteral string, which can be generated by the route helper from this library:

    import { route } from "nextjs-routes";
    
    <Link
      href={route({
        pathname: "/foos/[foo]",
        query: { foo: "bar" },
      })}
    >
      Baz
    </Link>;
  • Add RouteLiteral type. This type represents a string that confirmed to be a validated application route and can be passed to Link or useRouter. This is a TypeScript branded type.

    import { RouteLiteral } from "nextjs-routes";
  • Refine types for usePathname and useParams from "next/navigation" to use nextjs-routes generated types.

  • Fix generated routes when using parallel-routes and intercepting-routes.