react-touch
react-touch copied to clipboard
Draggable is broken, documentation does not match requirements
Please either release a working version of this library or update the documentation to reflect how to use it.
https://codesandbox.io/s/awesome-lewin-ms5t1
From the documentation:
<Draggable style={{translateX: 150, translateY: 200}}>
{({translateX, translateY}) => {
return (
<div style={{transform: `translate3d(${translateX}px, ${translateY}px, 0)`}}>
<Bubble />
</div>
);
}}
</Draggable>
I ran into the same problem. It seems like there would be an inconsistent use of the style / position property. You should be able to fix the problem by changing "style" to "position" when using the component if you use JavaScript or by changing "style" to "position" in the DraggableProps Type if you use TypeScript.