0

I use locomotive-scroll and nuxt3. I adding locomotive in my page layouts in tag:

<script setup lang="ts">
import {onMounted} from 'vue';
import LocomotiveScroll from 'locomotive-scroll';
provide('scroll', scroll);
onMounted(() => {
  const scroll = new LocomotiveScroll({
    el: document.querySelector('[data-scroll-container]'),
    smooth: true,
  });
  new ResizeObserver(() => scroll.update()).observe(document.querySelector("[data-scroll-container]"))
});
</script>

Locomotive-scroll working in my nuxt project, but when I try scroll up page Hermes, sometimes section not render.

My sandbox: https://codesandbox.io/s/github/cyprianwaclaw/nuxt

How to fix it ?

  • Closed because I don't really see the difference with the old one. Title being pretty much the same and the whole thing could simply be edited. No need to spam questions for a visibility purpose. – kissu Oct 11 '22 at 14:12

0 Answers0