aos
aos copied to clipboard
Document is not defined
This is:
- Bug
Specifications
- AOS version: 2.3.4 & 3.0.0 beta
- OS: Win 10
- Browser: Chrome

Same issue here on Next.js
Put it in useEffect if you use react, like this:
useEffect(() => { AOS.init(); }, []);
or
if (typeof window !== "undefined") AOS.init();
Put it in useEffect if you use react, like this:
useEffect(() => { AOS.init(); }, []);orif (typeof window !== "undefined") AOS.init();
This worked.