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

React complaining on missing unike key in array of element

Open galop1n opened this issue 3 years ago • 1 comments

Hi, I am on react-range 1.8.14 and I keep getting the warning on missing unique key from the JSX validation. The warning is emit by rendering children within the renderTrack callback.

My workaround has been to alter the children with {React.Children.toArray(children)} but a proper fix would be appreciated.

I i am doing something stupid, also possible, I am open to advice.

galop1n avatar Sep 23 '22 04:09 galop1n

I just put key from props in my custom thumb component

renderThumb={(props) => (
   <Thumb
    {...props}
    key={props.props.key}
    range={rangeRef.current}
    step={step}
    values={values}
  />
)}

jandolezal71 avatar Jun 26 '23 08:06 jandolezal71

fixed in examples

tajo avatar Jul 21 '24 06:07 tajo