How to create dynamic a category url route with next.js

Category: javascript
By: jeremy-one

I know in Next.js, you can create dynamic routes using square brackets "[]". But what name do I use in the brackets?

By: jeremy-one

I see now you can just put whatever name you want in the square brackets like:

category [slug] [topicId]

Here there is a folder of category and I used the name slug for the dynamic category name and topicId for the dynamic topic or post.

By: jeremy-one

The next.js documentation is showing using slug or id.

Next.js dynamic routes