Closed scortumee closed 5 years ago
Hi @scortumee,
I have prepared a Codepen to illustrate how to use dragscroll in React: https://codepen.io/natterstefan/pen/LrwWJj. Take a look at Settings -> Javascript to see what I imported.
Basically you have to make sure that dragscroll.js (eg. from a CDN) is part of your html (eg. in the <head>
of your index.html and add the dragscroll
class to your scroll container.
Simply add:import dragscroll from 'dragscroll';
at the top of any component that referenceS the "dragscroll" css selector
I tried to import this package like that
import dragscroll from 'dragscroll';
, and tried to to use itHowever, it is not working. I am new to React, so I don't know what I am doing wrong. Thank you