I am trying to use the react-use-gesture library, but can't even seem to get some simple hooks working. I'm trying to use the useScroll hook (eventually to get an animation running with react-spring), but when I bind it to my component, nothing happens.
import { useScroll} from 'react-use-gesture';
function App() {
const bind = useScroll((e) => {
e.scrolling ? console.log("I'm being scrolled") : console.log("I'm not being scrolled");
});
return (
<div className="App" {...bind()}>
// All of my other components in App
</div>
);
}
export default App;
I have a feeling I'm missing something obvious. Does anyone have any ideas?