@@ -119,29 +119,43 @@ function makeDynamicallyTrackedExoticParamsWithDevWarnings(
...
@@ -119,29 +119,43 @@ function makeDynamicallyTrackedExoticParamsWithDevWarnings(
returnproxiedPromise
returnproxiedPromise
}
}
functionwarnForSyncAccess(expression:string){
constnoop=()=>{}
console.error(
`A param property was accessed directly with ${expression}. \`params\` is now a Promise and should be unwrapped with \`React.use()\` before accessing properties of the underlying params object. In this version of Next.js direct access to param properties is still supported to facilitate migration but in a future version you will be required to unwrap \`params\` with \`React.use()\`.`
`A param property was accessed directly with ${expression}. \`params\` is now a Promise and should be unwrapped with \`React.use()\` before accessing properties of the underlying params object. In this version of Next.js direct access to param properties is still supported to facilitate migration but in a future version you will be required to unwrap \`params\` with \`React.use()\`.`
}else{
)
console.error(
}
`params are being enumerated. `+
`\`params\` should be unwrapped with \`React.use()\` before using its value. `+