Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recent version 7.29.0 raises 'Missing "key" prop for element in array react/jsx-key' unnecessarily; breaks build #3217

Closed
martha-anne opened this issue Feb 25, 2022 · 4 comments

Comments

@martha-anne
Copy link

When using version 7.29.0 in my webapp and running a build I am seeing thousands of 'Missing "key" prop for element in array react/jsx-key' errors which seem to be raised for every file, against lines which do not involve arrays at all. It appears to be raised any time an element contains any other element.

Versioning down to 7.28.0 fixes the issue.

Example

src/ui/components/resourceVideo/ResourceVideo.tsx
  Line 17:7:  Missing "key" prop for element in array  react/jsx-key
  Line 17:7:  Missing "key" prop for element in array  react/jsx-key
  Line 18:7:  Missing "key" prop for element in array  react/jsx-key
  Line 18:7:  Missing "key" prop for element in array  react/jsx-key

ResourceVideo.tsx:

import React, { FC, useRef, useState } from 'react';

import './ResourceVideo.sass';
import VimeoVideoPlayInModal from '../vimeoVideoPlayInModal/VimeoVideoPlayInModal';

type Props = {
  videoUrl: string;
  videoTitle: string;
};
const ResourceVideo: FC<Props> = ({
  videoUrl,
  videoTitle,
}: Props): JSX.Element => {
  return (
    <div className="resource-video">
      <VimeoVideoPlayInModal videoUrl={videoUrl} />
      <h3>{videoTitle}</h3>
    </div>
  );
};

export default ResourceVideo;
@Fox32
Copy link

Fox32 commented Feb 25, 2022

See #3215

@yoyo837
Copy link
Contributor

yoyo837 commented Feb 25, 2022

Duplicate of #3215

@ljharb
Copy link
Member

ljharb commented Feb 25, 2022

Duplicate of #3215.

@ljharb ljharb closed this as completed Feb 25, 2022
@ljharb
Copy link
Member

ljharb commented Feb 25, 2022

v7.29.1 is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants