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" />;
https://static.datadoghq.com/static/images/logos/github_avatar.svg https://static.datadoghq.com/static/images/logos/vscode_avatar.svg jetbrains

Seamless integrations. Try Datadog Code Analysis