I am trying to get a div to rotate on drag using the Draggable api in a fresh create-react-appinstallation.
I cannot seem to get it to rotate. Here is my App.js file:
import React, { Component } from 'react';
import { Draggable } from 'gsap/all'
class App extends Component {
componentDidMount() {
Draggable.create('.draggable', {
type: 'rotation',
onPress: function() {
console.log('clicked');
},
});
}
render() {
return (
<div>