I have two divs one is master and the other one is slave, I would like slave and master to follow each others scrolling.
master will always have the same width and height but slave can have any width and any height.
Problem: when I start scrolling it triggers an infinite loop because I'm using two useEffects to look at each others scroll percentage and update scrolling accordingly.
Sandbox: https://codesandbox.io/s/xenodochial-feather-3teev?file=/src/App.js