Avoid duplicate properties in JSX

Metadata

ID: jsx-react/jsx-no-duplicate-props

Language: JavaScript

Severity: Error

Category: Error Prone

Description

Providing duplicate properties to JSX elements can produce unexpected results in your project.

Non-Compliant Code Examples

<Hello name="John" name="John" />;
<Hello name="John" name="John">foo</Hello>;

Compliant Code Examples

<Hello firstname="John" lastname="Doe" />;