Skip to content

v7.20.6 has breaking changes for react/display-name #2758

@k-yle

Description

@k-yle

before v7.20.6 the react/display-name rule was okay with this pattern:

const renderer = a => listItem => ( <div>{a} {listItem}</div> ); // for context, that function might be used like this: <List list={[1, 2, 3]} renderItem={renderer(a)} />

Since v7.20.6 the react/display-name rule reports that "Component definition is missing display name" on line 1.

There's nothing in the changelog for v7.20.6 regarding the react/display-name rule so I suspect this is unintentional?

I'm also confused as to how we'd fix this because renderer is not a component, nor is the function it returns. So maybe this is a false positive?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions