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 ?