I run in the following error with RecylerListView.
scrollTo was called before RecyclerListView was measured, please wait for the mount to finish
How can I make sure that the scrollTo function is not called until RecylerListView has finished measuring?
The following approach is not working...
if (recyclerRef?.current ) {
recyclerRef.current?.scrollToIndex(index, true);
}
I found some sort of a workaround for my specific case, you just delay the function for 10ms:
..............
In my example i have got 60 items in my list. You can play around with the timer. This all happens inside a React.Component class, so dont wonder about my function notation. After doing this, the warning disappears.