v2.2.2-rc.2
Pre-release
Pre-release
What's Changed
2.2.2-rc.2
-
Adds support for Next.js's
app
directory.Link
accepts either static routes (no url parameters) or aRouteLiteral
string, which can be generated by theroute
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 toLink
oruseRouter
. This is a TypeScript branded type.import { RouteLiteral } from "nextjs-routes";
-
Refine types for
usePathname
anduseParams
from"next/navigation"
Full Changelog: v2.2.2-rc.1...v2.2.2-rc.2