react-range
react-range copied to clipboard
React complaining on missing unike key in array of element
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.
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}
/>
)}
fixed in examples