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.
Exact message you may see
`key` is not a prop
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
- Pass it twice: <Row key={id} id={id} /> and read props.id
- Rename the prop if the child only needs an identifier (itemId)
Detailed fix by platform
React
{rows.map(r => <Row key={r.id} id={r.id} />)}
How to diagnose
- Prop — Where is props.key read?
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- [Vue warn]: Invalid prop: type check failed Vue: [Vue warn]: Invalid prop: type check failed for prop "count". Expected Number with value 5, got String with value "5"
- [Vue warn]: Missing required prop Vue: [Vue warn]: Missing required prop: "title"
- [Vue warn]: Set operation on key failed: target is readonly Vue: [Vue warn]: Set operation on key "name" failed: target is readonly.
Most viewed in React
- React must be in scope ReferenceError: React is not defined / 'React' must be in scope when using JSX
- No QueryClient set Error: No QueryClient set, use QueryClientProvider to set one
- Functions cannot be passed Error: Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server".
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 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.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Did this fix work for you?
Report a correction or suggest an improvement
Last updated 14 Oct 2026