Reactjs – how to get previous value of scrollYProgress value?
I want to store the previousValue of scrollYProgress of framer motion. I want to render something depending on the difference between previous and latest value. How to get and store it? useMotionValueEvent(scrollYProgress, "change", (latest) => { console.log(scrollYProgress.get()); });