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

knipferrc picture knipferrc  路  3Comments

formula349 picture formula349  路  3Comments

jesselee34 picture jesselee34  路  3Comments

flybayer picture flybayer  路  3Comments

ghost picture ghost  路  3Comments