Javascript – Best way of calling conditioned function just once in useEffect if frequent changes in dependency array?
I use "Scrollytelling" in my React application and need to change an svg dynamically according to the current scrollprogress of a section. For example like this: useEffect(() => { if(scrollProgress > 0.5 && scrollProgress < 0.7) foo(); // Called at…