key is not a prop ⚛️ React

Warning: `key` is not a prop. Trying to access it will result in `undefined` being returned.

A component tried to read props.key, which React reserves and never passes down.

Seen on: React

Meaning

key (and ref before React 19) are special. Pass the value under another prop name if the child needs it.

Common causes

  • Reading props.key inside a child
  • Spreading props expecting key to pass through

⚡ Quick fix

  1. Pass it twice: <Row key={id} id={id} /> and read props.id
  2. Rename the prop if the child only needs an identifier (itemId)

Detailed fix by platform

React

  1. {rows.map(r => <Row key={r.id} id={r.id} />)}

How to diagnose

  1. Prop — Where is props.key read?
  2. Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.