I found the bug... The problem was that useLayoutEffect
didn't call his callback when props.zoomValue
changes. This won't create a new observer with the updated props.
The fix was to add the zoomValue into the inputs. 🤦♂️🤦♂️🤦♂️
useLayoutEffect(() =>
{
// ...
}, [root.current, props.zoomValue]); // <--- this