DEV Community

Leonid Fenko
Leonid Fenko

Posted on

I Made React Router v6 Type-Safe

I updated my react-router-typesafe-routes for React Router v6. It's almost a complete rewrite, because React Router has changed quite significantly.

✨ Highlights:

  • Full support for nested routes.
  • Typing / validation of every URL part and state.
  • Optional inferring of path params from provided path.
  • Thin wrappers around React Router hooks for dealing with params in a type-safe way.
  • Support for web and React Native (I didn't really test React Native 😅).

A detailed description is available at the project page. I hope it will help you in making your apps a little safer.

Top comments (0)