'Open a list of popovers - react

I have an element that has a Popover. My Popover components gets a ref and know how to position itself:

const ref = useRef();

<div ref={ref}>Element</div>
<Popover targetRef={ref} >Popover element </Popover>

Now, I want to add a second Popover that will open under the first one: enter image description here

Which ref I need to give to the second Popover? How can I achieve this behavior?



Sources

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

Source: Stack Overflow

Solution Source