I'd like to understand the reason for this warning/error: 'Property 'scrollToIndex' does not exist on type 'FlatList<School>'
I have a React Native Snap Carousel list that should be scrolling another list on snap.
I created a ref for the list that I want to scroll with const schoolList = useRef<FlatList<School>>(null);The assigned the ref to that list with ref={schoolList}And my carousel does this:
<BottomCarousel ... onSnapToItem={(index) => { schoolList.current?.scrollToIndex({ animated: false, index }); }}/>The error I get is on this line: schoolList.current?.scrollToIndex({ animated: false, index });
So I did some digging. scrollToIndexdefinitely exists for FlatList.What am I missing?