React locomotive scroll метод on()
Как в react-locomotive-scroll вызвать метод on()?
const ref = useRef(null);
const options = {
smooth: true,
lerp: 0.08,
table: {
smooth: true
},
smartPhone: {
smooth: true
},
}
<LocomotiveScrollProvider options={options} containerRef={ref}>
<div className={demoFour.demo_four} data-scroll-container ref={ref}>
<div className={demoFour.demo_four__container}>
<section className={demoFour.home} data-scroll-section=""></section>
</div>
</div>
</LocomotiveScrollProvider>
Источник: Stack Overflow на русском