I'm trying to swap out the default image that the browser uses when I drag a draggable element (in this case the ul below). Here is my code. I'm not getting any errors - it just doesn't work, and I'm left with the default image used by the browser.
drag(e) {
let img = new Image()
img.src = 'https://some-image.png'
e.dataTransfer.setDragImage(img, 0, 0)
}
render() {
return(
<ul draggable="true" onDrag={(e) => {this.drag(e)}>
<li>1</li>
<li>2</li>
</ul>
)
}