key is not a prop React Origin: On your device OSI layer 7 · Application Last updated 14 Oct 2026

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

  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 not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

[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)[Vue warn]: Invalid p…[Vue warn]: Missing required prop — Vue: [Vue warn]: Missing required prop: "title" (Vue)[Vue warn]: Missing r…[Vue warn]: Set operation on key failed: target is readonly — Vue: [Vue warn]: Set operation on key "name" failed: target is readonly. (Vue)[Vue warn]: Set opera…Adjacent JSX elements — Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>? (React)Adjacent JSX elementsAvoid mutating a prop directly — Vue: [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders (Vue)Avoid mutating a prop…Failed prop type: The prop href expects a string or object in <Link> — Next.js: Error: Failed prop type: The prop `href` expects a `string` or `object` in `<Link>`, but got `undefined` instead (Next.js)Failed prop type: The…IndexError — IndexError: list index out of range (Python)IndexErrornon-boolean attribute — Warning: Received `true` for a non-boolean attribute `x`. (React)non-boolean attributekey is no…

Explore the map of this error Full error map →

🧠 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.