Description
Hi !
I hope you are doing well,
I'm experiencing some bugs with Nextjs 14,
I have long pages, with some images, and regularly, I have some jumps from bottom to mid page,
Also, the scroll can't goes to the bottom of the page.
I'm using this code that reruns Loco on each time the current page changes, thanks to the new pathname
hooks.
useEffect(() => {
(async () => {
const LocomotiveScroll = (await import('locomotive-scroll')).default;
loco.current = new LocomotiveScroll({})
}
)()
}, [pathname])
I've read here and there that triggering a "Resize" event could do the work, but it's seems to work randomly.
I've tried to do something like :
window.addEventlistener('DOMContentLoaded', () =>{ loco.current.update() })
But the event is never firing neither.
Plus, I saw that loco.update() is a function that could resolve some things, but I doesn't even exist.
Do you have any on how to resolve that ?
Thanks,
Have a great day !
Activity