Closed drokbers closed 3 months ago
@drokbers Im having a similar issue after switching to app router on nextjs, did you manage to find a solution?
@drokbers Im having a similar issue after switching to app router on nextjs, did you manage to find a solution?
I couldn't solve the error, but when I deploy it to Vercel, it's not giving an error. It only gives an error when I'm working locally.
You just pass key={props.key} at renderThumb
eg
renderThumb={({ props, isDragged }) => (
<div
{...props}
key={props.key}
className={`h-3 w-3 rounded-full bg-white ${
!isDragged ? "opacity-0" : ""
} group-hover:opacity-100`}
style={{
...props.style,
boxShadow: "0px 2px 6px #AAA",
}}
></div>
)}
Example updated.
My Code:
Error:
First of all, I checked if there is a key in the props object and if there is, I thought of defining it separately as follows :
Then it gave an error "message": "Property 'key' does not exist on type 'ITrackProps'.", so renderTrack and renderThumb callbacks do not have a property named key.
How can I solve this problem?