I've upgraded to NextJS 15+ where Params are now Promises. Per this thread I've changed the declaration in my Page.TSX files that has a refId param as follows:
Previously
export default function DynamicRoute({ params }: { readonly params: { refId: string } }) {
Now
export default function DynamicRoute({ params }: { readonly params: Promise<{ refId: string }> }) {
This worked, but I also have references to {params.refId} in the render that are now showing errors.
return (
{/* Error shown here:
Property 'refId' does not exist on type Promise<{refId:string}> */}
)
I'd like to avoid creating new dedicated types. How can I fix this?