I have a problem. I had coded react-native and react-navigation.
In 'HOME' screen, I had scrolled down, and When I had pressed the icon 'HOME',
There are no any changes to scroll.
Certainly, I have used 'ref - useScrollToTop method', But I cannot go to screen up
<Tab.Navigator>
<Tab.screen name='home' component={HomeNavigation} options={{ <Image ...(blah blah) /> }} />
</Tab.Navigator>
----
<HomeNavigation.Navigator initialRouteName="Main" name="Main" component={HomeTopTabNavigation}>
<HomeNavigation.Screen name="Main" component={HomeTopTabNavigation} />
<HomeNavigation.Navigator />
----
<HomeTopTabNavigation.Navigator initialRouteName='NEW'>
<HomeTopTabNavigation.Screen name="NEW" component={Home} />
<HomeTopTabNavigation.Screen name="HOT" component={HOT} />
</HomeTopTabNavigation.Navigator>
----
const Home = ({ navigation }) => {
const ref = React.useRef(null); *******. This ref does not work !
useScrollToTop(ref); *******. This ref does not work !
...
return (
...
<FlatList
ref ={ref} *******. This ref does not work !
...
/>
)
}
more specific navigation name in this picture. please see this.