I\'m a newbie to NextJS, It looks so good on the first impression. But after giving it a chance I\'ve faced some problems like URL routing with custom params like react-router.<
For anyone arriving late to this party, we now have dynamic routing in Next 9.
Which would allow for a url structure to be crafted like this by using the file structure, and without additional packages.
You could create a file pages/user/[id].js
With
import { useRouter } from 'next/router'
const User = () => {
const router = useRouter()
const { id } = router.query
return User: {id}
}
export default User