5 ms·
Shameful ad for our own router: https://swan-io.github.io/chicane https://swan-io.github.io/chicane, with type-safe route consumption and creation (and other go
by zoontek 4y ago
Shameful ad for our own router: https://swan-io.github.io/chicane 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