Next Safe Navigation

screenshot of Next Safe Navigation
nextjs

Static type and runtime validation for navigating routes in NextJS App Router with Zod schemas

Overview:

The InstallSafe NextJS Navigation package provides a convenient solution for managing application routes and enhancing navigation in Next.js projects. By declaring routes and parameters in a centralized location, developers can benefit from runtime validation for both React Server Components (RSC) and Client Components. The package aims to improve the developer experience by offering autocomplete features and ensuring accurate type information for route parameters.

Features:

  • NPM Package: Available as a package on NPM for easy installation.
  • Centralized Route Declaration: Declare application routes and parameters in a single place.
  • Runtime Validation for RSC: Provides runtime validation for React Server Components.
  • Runtime Validation for Client Components: Offers runtime validation for Client Components.
  • Enhanced Autocomplete: Enable experimental.typedRoutes in next.config.js for improved autocomplete when defining routes.
  • Type Transformation: Handles type transformations during parsing, ensuring accurate type information for route parameters.
nextjs
Next.js

Next.js is a React-based web framework that enables server-side rendering, static site generation, and other powerful features for building modern web applications.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.

vercel
Vercel

Vercel offers built-in support for deploying and hosting Next.js applications, making it a popular choice among Next.js developers.