79438746

Date: 2025-02-14 08:30:06
Score: 1
Natty:
Report link

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
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: magg