Incorrect values calling getClientBoundingRect() on mounted
Hello people hope you're having a good day
Basically i have a page and a component, in that component i want to get the position of 4 items and use them in the page to place an svg and connect these items
In the component i have a defineModel to store the values like this
And on the main page
However at first i noticed that my elements were misplaced however after a hot reload (adding a console.log) they had a different position
From what i read it's because onMounted stores the values before DOM has finished loading so i tried using nextTIck like this on the onMounted hook but still no difference
onUpdated works however it causes an infinite loop so no bueno.. So how do i fix this issue ?
0 Replies