{"repo":"lukemorales/next-safe-navigation","free":true,"listed":false,"github":"https://github.com/lukemorales/next-safe-navigation","clone":"git clone https://github.com/lukemorales/next-safe-navigation.git","description":"Static type and runtime validation for navigating routes in NextJS App Router with Zod schemas","language":"TypeScript","stars":176,"topics":["app-router","app-router-nextjs","navigation","next","next-js","nextjs","runtime-validation","static-typechecking","type-safety","typescript"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"Safe NextJS Navigation Static type and runtime validation for navigating routes in NextJS App Router with Standard Schema support (Zod, Valibot, ArkType, etc.). Static and runtime validation of routes, route params and query string parameters on client and server components. 📦 Install Safe NextJS Navigation is available as a package on NPM, install with your favorite package manager: You'll also need to install a Standard Schema compatible validation library: ⚡ Quick start [!TIP] Enable experimental.typedRoutes in next.config.js for a better and safer experience with autocomplete when defining your routes Declare your application routes and parameters in a single place Runtime validation for React Server Components (RSC) [!IMPORTANT] The output of a schema might not be the same as its input, since schemas can transform the values during parsing (e.g.: string to number coercion), especially when dealing with URLSearchParams where all values are strings and you might want to convert params to different types. For this reason, this package does not expose types to infer params or searchParams from your declared routes to be used in page props: Instead, it is strongly advised that you parse the params in your server components to have runtime validated and accurate type information for the values in your app. Runtime validation for Client Components Use throughout your codebase as the single source for navigating between routes: 🔄 Standard Schema Support This library now suppor","default_branch":null,"files":null,"tree":[],"storefront":"/r/lukemorales","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/lukemorales/next-safe-navigation/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}