I can confirm that react-use-draggable-scroll works in React 19.
However, MutableRefObject is deprecated.
A workaround (for TypeScript)
const refDraggable = useRef<HTMLDivElement>(null);
const { events } = useDraggable(refDraggable as RefObject<HTMLDivElement>);
Please update react-use-draggable-scroll to change MutableRefObject to RefObject. The useRef hook also requires an argument for better type safety. Since the code has not been updated in three years, this might require forking the project if the maintainer has abandoned it.
I can confirm that
react-use-draggable-scrollworks in React 19.However,
MutableRefObjectis deprecated.A workaround (for TypeScript)
Please update
react-use-draggable-scrollto change MutableRefObject to RefObject. TheuseRefhook also requires an argument for better type safety. Since the code has not been updated in three years, this might require forking the project if the maintainer has abandoned it.