Skip to content

react/jsx-key Doesn't work w/ destructured props #2258

Closed
@RavenHursT

Description

@RavenHursT

A component like this causes this rule to error out, even though there most definitely is a key prop on the underlying JSX:

const Foo = props => (
  [
    <div {...{
      key:1
      {...props} />,
    <div {...{
      key:2
      {...props} />
  ]
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions