Next.js Discord

Discord Forum

why I can no longer place {...props} before key={...}?

Unanswered
Bighead carp posted this in #help-forum
Open in Discord
Bighead carpOP
Hi, I been working on Nextjs v13, recently I migrated to Nextjs v15, but now all components with:
    <SomeComponent
        {...props}
        key={'some-key'}
        ...
    />

is not displaying or throwing undefined errors like:
TypeError: Cannot read properties of undefined (reading 'type')


if I move {...props} down like:
    <SomeComponent
        key={'some-key'}
        {...props}
        ...
    />

it will work

Why is that?

1 Reply

seems like a cache issue, deleting .next and restart the dev server should work