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