Every time I hear any news about routing in a React framework I always get disappointed that the news isn't that they're introducing type-safe (TypeScript) routes to enable type-safe linking.
Like so: https://www.typescriptlang.org/play?jsx=4#code/C4TwDgpgBASg9...
TS' string literal types are powerful.
https://www.typescriptlang.org/docs/handbook/2/everyday-type...
edit: I did implement this a while back but found it gave me only so much additional value. Though I can imagine that large applications with dozens of developers might indeed benefit from type-safe routes to avoid dead links.
No weirdness or magic API, the useRoute hook just return a discriminating union with typed params. It's fully-featured and used in prod.
The API is quite simple:
const Router = createRouter({ UserDetail: "/users/:userId" });
Router.UserDetail({ userId: "xxx" }); // safe