-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Hi team, I think a somewhat recent change to NextJS has lead to a regression in Speed Insights.
Core problem: my dashboard shows primary a single path being hit /...catchAll, even though I'm certain that other paths are being navigated to.
The relevant part of my file structure is as follows:
app/@modal/[...catchAll]`
app/m/[merchantHandle]/p/[productSlug]
Taking a quick pass at the NextJS repo, my guess is that this regression was caused by one of the following PRs (probably 65063 from the magician @ztanner):
vercel/next.js#65063
vercel/next.js#65233
vercel/next.js#65277
Concretely, when I log the output of useParams and usePathname from a Client component in my root layout I see the following:
{"params":{"catchAll":["m","rowingblazers","p","the-croquet-stripe-rugby"],"merchantHandle":"rowingblazers","productSlug":"the-croquet-stripe-rugby"},"pathname":"/m/rowingblazers/p/the-croquet-stripe-rugby"}
Notice in the above that the params from useParams now includes the catchAll key in addition to the merchantHandle and productSlug keys. My guess is that the Speed Insights logic might need to be changed to something like "Use the params from a catchAll key if and only if there are no other dynamic params present."
Let me know if I can provide any other info to help debug. Thank you!
