Open TommyTheTribe opened 1 year ago
After a lot of testing I managed to solve this by calling getNativeScrollRef
on FlatList<T>
:
import {FlatList, ScrollView} from 'react-native-gesture-handler'
import {useRegisterScroller} from '@nandorojo/anchor'
const {registerScrollRef} = useRegisterScroller()
<FlatList
ref={list => registerScrollRef(list?.getNativeScrollRef() as ScrollView)}
// ...
/>
Hmm interesting we could implement this in the library
It would be great, if I could achieve the same result with SectionList
Hi sir, thanks for your work !
It seems that there is an issue with FlatList, I got an error ref.measureLayout must be called with a node handle or a ref to a native component.
Here is my code :
"react-native": "0.71.0"
Thanks for your help !