react-slider icon indicating copy to clipboard operation
react-slider copied to clipboard

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

Open designbyadrian opened this issue 1 year ago • 9 comments

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

designbyadrian avatar Apr 10 '23 09:04 designbyadrian

Hi!

Is there any update on fixing this warning?

Keqi avatar Aug 11 '23 07:08 Keqi

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

kris-ellery avatar Aug 13 '23 18:08 kris-ellery

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

marif0025 avatar Jan 10 '24 05:01 marif0025

Any update?

MdAyman7 avatar May 06 '24 06:05 MdAyman7

Any updates? Got the same bug on NextJs 14

nikfakel avatar Jun 03 '24 21:06 nikfakel

+1

lollobaldo avatar Aug 14 '24 18:08 lollobaldo