Closed tatethurston closed 2 years ago
@IRediTOTO Thanks for the kind words. Could you expand on what ROUTES.ITEMS. returns? Is it the pathname?
And do you want an interface to type the arguments to ROUTES.ITEMS or to have ROUTES.ITEMS generated as well?
Hi, I mean
const ROUTES={
ITEM:(itemId)=>{
return `/just-a-link/${itemId}`
}}
// same as
/just-a-link/[itemId]
I think there is some overlap here with #36. To date, this library only generated types and this would require generating a runtime.
I’ll think on this.
This API seems kind of similar to https://github.com/aspida/pathpida. I really like how nextjs-routes is just a drop-in solution right now (with no runtime impact!).
This API seems kind of similar to https://github.com/aspida/pathpida. I really like how nextjs-routes is just a drop-in solution right now (with no runtime impact!).
Look like this is what i am searching.
Yeah pathpida looks great if you want a runtime
If there is sufficient interest in a runtime I’ll look into it for nextjs-routes but pathpida seems to fill this need.
This has been implemented and released in nextjs-routes vv0.0.21
Originally posted by @IRediTOTO in https://github.com/vercel/next.js/discussions/28622#discussioncomment-3126130