LoginSignup
1
1

Next.jsで全てのルートを受け取る方法

Posted at

Next.jsで全てのルートを受け取りたい場合、[[...slug]]のように二重カッコ内にパラメータを入れることで実装できます。

app/[[...slug]]/page.js/,/hoge,/hoge/fugaなどにマッチします。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1