我试图在我的法典中利用这一点:
const navigation = useNavigation();
navigation.replace( AllFriends )
但我仍犯了一个错误:
Property replace does not exist on type NavigationProp<Record<string, object | undefined>, string, NavigationState, {}, {}> .
我也试图利用这一方法。
const navigation = useNavigation<StackNavigationProp<{route: {} }>>()
navigation.replace( route );
如下文所示:https://github.com/react-navigation/react-navigation/issues/82<56/a>。
but this gives me an error on replace that expected 2 arguments but got only 1...
I am using "@react-navigation/native": "^5.5.1",