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

React 18.3: A props object containing a "key" prop is being spread into JSX #288

Open
designbyadrian opened this issue Apr 10, 2023 · 5 comments · May be fixed by #300
Open

React 18.3: A props object containing a "key" prop is being spread into JSX #288

designbyadrian opened this issue Apr 10, 2023 · 5 comments · May be fixed by #300
Assignees
Labels

Comments

@designbyadrian
Copy link

Description

In React and React-DOM 18.3.0, a console error is reported when rendering the ReactSlider component with this message:

let props = {key: someKey, className: ..., style: ...};
  <div {...props} />
React keys must be passed directly to JSX without using spread:
  let props = {className: ..., style: ...};
  <div key={someKey} {...props} />

Referencing this file: node_modules/react-slider/dist/es/prod/components/ReactSlider/ReactSlider.mjs

Maybe not much help, but this is the screenshot of the highlighted line for said console message:

image

@Keqi
Copy link

Keqi commented Aug 11, 2023

Hi!

Is there any update on fixing this warning?

@kris-ellery kris-ellery self-assigned this Aug 13, 2023
@kris-ellery kris-ellery linked a pull request Aug 13, 2023 that will close this issue
@kris-ellery
Copy link
Member

Hi there, I have an open MR and should merge it this week. Thanks!

@marif0025
Copy link

Hi,
Any update on this issue? Or if we can remove this warning at least?

@MdAyman7
Copy link

MdAyman7 commented May 6, 2024

Any update?

@nikfakel
Copy link

nikfakel commented Jun 3, 2024

Any updates? Got the same bug on NextJs 14

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

Successfully merging a pull request may close this issue.

6 participants