Skip to content

PageProps Type Errors in Next.js #142577

Discussion options

You must be logged in to vote

Hi @Universe0809,
It appears that there are breaking changes in Next.js version 15 related to properties such as params. The official documentation highlights this issue (see: Next.js v15 Upgrade Guide).

To address these changes, you have a couple of options:

  1. Downgrade: Consider reverting to an earlier version of Next.js where these breaking changes do not apply.
  2. Update your Code: You can handle the params by awaiting them in your function as follows:
    `type Params = Promise<{ slug: string[] }>;

export default async function Page({ params }: { params: Params }) {
const { slug } = await params;
}`

This approach ensures that your application remains compatible with the latest version of Ne…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@iliya06
Comment options

Comment options

You must be logged in to vote
6 replies
@Universe0809
Comment options

@night-fury-3
Comment options

@LongLH3008
Comment options

@renny-ren
Comment options

@VanThuan76
Comment options

Answer selected by Universe0809
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working correctly General
6 participants