0

我可以在createStackNavigator

import { createStackNavigator, GestureHandlerRefContext } from '@react-navigation/stack'; 

<GestureHandlerRefContext.Consumer>
          {(ref: any) => (
            <NativeViewGestureHandler waitFor={ref}>
                <ScrollView>...</ScrollView>
            </NativeViewGestureHandler>
          )}
 </GestureHandlerRefContext.Consumer> 

我想这样做createNativeStackNavigator,我怎样才能GestureHandlerRefContext得到createNativeStackNavigator

import { createNativeStackNavigator } from 'react-native-screens/native-stack'

<GestureHandlerRefContext.Consumer>
          {(ref: any) => (
            <NativeViewGestureHandler waitFor={ref}>
                <ScrollView>...</ScrollView>
            </NativeViewGestureHandler>
          )}
 </GestureHandlerRefContext.Consumer> 
4

0 回答 0