-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
Description
We have a functional component that is exported with React.memo
import React from 'react'
import { string } from 'prop-types'
function Component({ world }) {
return <div>Hello {world}</div>
}
Component.propTypes = {
world: string,
}
export default React.memo(Component)
This triggers the react/display-name
error after the update from 7.11.1
[...]/Component.jsx
12:16 error Component definition is missing display name react/display-name
The exported components displayName
is Memo(Component)
.
Without React.memo
it recognizes the displayName
.
export default Component
nmussy, AlexGodard, temurih, eoin-mullan-instil, dannyradden and 9 more