'Where to find a div's x and y coordinates for window.scrollTo?

I have a react project that calls an api. I want to scroll to the responses that are stored in a div when they are done loading. Where do I find the x and y coordinates of this div in order implement this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source