HTMLElement is not defined - VueUse
Hi, i'm trying to use https://vueuse.org/core/useScroll/#usescroll from VueUse
const el = ref<HTMLElement | null>(null)
const { x, y, isScrolling, arrivedState, directions } = useScroll(el)
But I got this HTMLElement is not defined
Do you know how can use global window element?
Thank you π11 Replies
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
The last : 3.2.3
The complete code in component :
Error :
SSR related error? But how can fix? π
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Sure!
I have this :
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
@Sr. Full Stack Dev Oh god! Thanks! β€οΈ
Not more error but I don't see
console.log('Scrolling ...');
maybe useScroll
don't take the global html element?Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Oh ok, I just want to watch
isScrolling
on entire site ^^Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Yes, I think I will do that π
Thank you !
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View