Next.js: Support /subpath/:parameter route

Created on 1 Jan 2017  路  5Comments  路  Source: vercel/next.js

Does next.js have a plan to support customized route like domain/path/:id and it will go to pages/path and use id as a query parameter?

I've made some rough changes in my forked repo
https://github.com/cctuan/next.js/commit/cb31cb00a38dab4dae0679f08cb25fb0a8c62e73
which support developer customize route in next.config.js

Most helpful comment

I know you guys so far decided you won't support this out of the box, but this is such an obvious and "basic" feature I feel if you provide routing at all (which you do), this should be part of it and work automagically..

All 5 comments

I believe you mean something like https://github.com/zeit/next.js/tree/master/examples/parameterized-routing.

We don't support built-in routings, but you can implement it with custom server API.
See https://github.com/zeit/next.js/issues/291 for more details about this decision.

thank you for your quick response

I know you guys so far decided you won't support this out of the box, but this is such an obvious and "basic" feature I feel if you provide routing at all (which you do), this should be part of it and work automagically..

@bassbump it's not like we don't support it. We do support it.
See: https://github.com/arunoda/coursebook-ui/blob/master/server.js#L40

@bassbump there are quite a few extensions out there:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timneutkens picture timneutkens  路  250Comments

nvartolomei picture nvartolomei  路  78Comments

Timer picture Timer  路  60Comments

poyiding picture poyiding  路  73Comments

nickredmark picture nickredmark  路  60Comments