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 · 11 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 · 11 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

@lollobaldo
Copy link

1

@shubhankartrivedi
Copy link

Any update on this?

@vigenere23
Copy link

vigenere23 commented Sep 17, 2024

Also 1, will be needed for React 19.
There seem to be a stale PR to fix this, but it has been more than a year : #300.
It has not been merged last week @kris-ellery ;p

@franciscawebisoft
Copy link

is there an update?

@junbong
Copy link

junbong commented Oct 24, 2024

Any updates?

@kris-ellery
Copy link
Member

My team has not been able to prioritize these changes and tickets. I'll bring this up and see if someone else can take the lead on reviewing and merging any outdated PRs.

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.