I am trying to use this in my code:
const navigation = useNavigation();navigation.replace('AllFriends')
But I keep getting an error that:
Property 'replace' does not exist on type 'NavigationProp<Record<string, object | undefined>, string, NavigationState, {}, {}>'.
I also tried using this
const navigation = useNavigation<StackNavigationProp<{route: {} }>>()navigation.replace('route');
as suggested here: https://github.com/react-navigation/react-navigation/issues/8256
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",