Not sure if I'm just being stupid, but I can't seem to figure out how to do this without just using useNodes and looping through the array it gives you. I've tried using useReactFlow hook but not sure how do get that to work inside a custom node.
I've also tried accessing the positionAbsoluteX and positionAbsoluteY props however, those don't seem to be updated dynamically.