zillow / react-slider

Accessible, CSS agnostic, slider component for React.
https://zillow.github.io/react-slider
MIT License
883 stars 231 forks source link

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

Open designbyadrian opened 1 year ago

designbyadrian commented 1 year ago

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 commented 10 months ago

Hi!

Is there any update on fixing this warning?

kris-ellery commented 10 months ago

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

marif0025 commented 5 months ago

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

MdAyman7 commented 1 month ago

Any update?

nikfakel commented 4 weeks ago

Any updates? Got the same bug on NextJs 14