Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Next.js Layouts RFC: Nested routes and layouts, designed for Server Components. Parent comment
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
There are no comments on this comment yet.
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