New
Introducing React Doctor for Enterprise

react/jsx-no-duplicate-props

Disallow duplicate props on a JSX element — React silently keeps only the last value.

Validation prompt

Use this to decide whether a fired diagnostic is real or a false positive.

Fires when a single JSX opening element lists the same prop name twice (<App foo={2} bar foo={3} />); React keeps only the last value and silently drops the earlier ones. Oxc's comparison is case-sensitive — <Foo bar bAr /> is intentionally allowed, since the eslint-plugin-react ignoreCase: true behavior is not ported. False positives are essentially nonexistent.

Fix prompt

Use this once validation confirms the diagnostic is real.

Pick the one value you actually want and delete the duplicate. If you meant to layer defaults under an override, spread the base first and put the explicit override after: <Foo {...defaultProps} foo={3} /> so the precedence is visible in source order. See https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-no-duplicate-props.html

More Correctness rules from the rules reference:

  • react/jsx-no-script-url: Disallow javascript: URLs in href — they execute arbitrary code, and React 19 throws on them.
  • react/no-children-prop: Disallow passing children as an explicit prop — nest content between the opening and closing tags instead.
  • react/no-danger: Flag dangerouslySetInnerHTML — raw HTML injection bypasses JSX escaping and invites cross-site scripting.
  • react/no-direct-mutation-state: Disallow mutating this.state directly in class components — use setState so React schedules a re-render.
  • react/no-is-mounted: Disallow the removed legacy isMounted() API — cancel async work instead of guarding setState.