Skip to content

jsx-key Missing "key" prop for element in array when there is no array/iteration #3215

Closed
@alicerocheman

Description

@alicerocheman

Hello,

I just upgraded eslint-plugin-react from 7.28.0 to 7.29.0

The result is I now get a Missing "key" prop for element in array error on all my components, regardless of them having an array/map or anything that would require a key prop.

Before upgrade, the app worked fine, the key prop was already where it should be, on all arrays/lists.

Example of error:

  17:7  error  Missing "key" prop for element in array  react/jsx-key

Screenshot 2022-02-25 at 08 29 31

=> no array on line 17 char 7, just calling a component.

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