How to get the position of the object without touching it in react naitve?

182 Views Asked by At

I want to get the position of the object without touching the view or the object. I am using enter link description here

to slide the object but i want to get the position of the object without touching the slider. Is there any way to get the position.

1

There are 1 best solutions below

0
On BEST ANSWER

To get the position of element you can use measureLayout. It's well explained with provided example in documentation:

https://reactnative.dev/docs/direct-manipulation#measurelayoutrelativetonativecomponentref-onsuccess-onfail