Using References
I have noticed some work arounds such as providing absolute co-ordinates of the component and then adjusting the function and corresponding co-ordinates of the child component from device to device. This is a temporary fix and not really desirable. Here's when the references
come into picture.
<Component
ref={ref => {
this.compRef = ref;
}}
/>
once you assign a ref to particular component, you can use react-native's scrollTo()
https://reactnative.dev/docs/scrollview#scrollto in order to invoke the scroll event in the UI.
this.compRef.scrollTo({
//...props here
});
in case one is using functional components, leverage the useRef()
https://reactjs.org/docs/hooks-reference.html#useeffect hook to pass references and use them for scrolling.
In order to ship a production ready code, deep linking is always recommended. For more info regarding how to use references and how to connect them with the scrollTo()
function in scrollView
find an example here: https://arsfutura.com/magazine/deep-linking-in-react-native-scroll-to-element/

source: https://arsfutura.com/magazine/deep-linking-in-react-native-scroll-to-element/