Closed
Description
The react/display-name
documentation doesn't explicitly state it, but the rule seems to accept display names as properties inside components.
=> Documentation needs to be updated
When the displayName
was defined as a property, I think the rule should ensure that the declaration is static
, so the following case should be rejected:
class Demo extends Component {
displayName = "Demo"
}
Whereas the following should be accepted:
class Demo extends Component {
static displayName = "Demo"
}