1

While I'm developing with NextJS, I have a question.
To Use dynamic routing, we write file like [id].js
When my directory structure is like this:
pages
 ㄴ area
   ㄴ [area].js ,br/>

page example is like 'area/texas' or 'area/newyork'

I want to double dynamic routing like 'area/texas/houston' or 'area/texas/dallas'
(page/area/region, area and region can change)
But I don't know how to make file structure
I tried a few way, I failed :-(

Let me know, how to make structure!!

1 Answer 1

3

Just rename [area].js to [...area].js

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.