Comment

Comment by zoontek

Shameful ad for our own router: https://swan-io.github.io/chicane, with type-safe route consumption and creation (and other goodies).

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

parent zoontek 4 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton