I am using react-popper and I need to spawn the popper on the position of its reference element. I can calculate the X & y position inside the reference element but I am unable to find a solution to position popper in that location.
const {top, left} = e.target.getBoundingClientRect();
const xPosition = e.clientX - left;
const yPosition = e.clientY - top;
Note: The reference element exists on the edges of the screens too. Any help on this?