asscroll icon indicating copy to clipboard operation
asscroll copied to clipboard

Not working with Next.js

Open pascaliii opened this issue 2 years ago • 1 comments

Hi, i would like to use Asscroll in my Next.js project. When i use the "zero config setup", it throws the error "Self is not defined". I tried to use dynamic imports and set asscroll-container="true", but its not fixing the problem.

Does anyone know any other solutions?

pascaliii avatar Aug 11 '22 07:08 pascaliii

I had the same issue

Import like that inside your useEffect :

const ASScroll = require("@ashthornton/asscroll");
const asscroll = new ASScroll();

luciamvm avatar Aug 12 '22 10:08 luciamvm