Next.js Discord

Discord Forum

not-found.js not accepting props

Answered
Alaska pollock posted this in #help-forum
Open in Discord
Original message was deleted.
Answered by DirtyCajunRice | AppDir
the simplest way - if path - is to make not-found a client component, and do useParams()
View full answer

4 Replies

is your language set in headers, or in path only
the simplest way - if path - is to make not-found a client component, and do useParams()
Answer
if you want it to be a server component, you need to use headers() get the path from headers, and parse the path yourself
either way gets you what you need.