Closed bhandanyan-nomad closed 1 year ago
My workaround for now is:
const PendoNavigationContainer = WithPendoReactNavigation(
NavigationContainer,
) as typeof NavigationContainer;
@bhandanyan-nomad Strange, I don't see such error for instance my sample code:
const navigationRef = useNavigationContainerRef();//OR createNavigationContainerRef();
return (
<BottomSheetContext.Provider
<SafeAreaProvider>
<PendoNavigationContainer
ref={navigationRef}
>
<GestureHandlerRootView style={styles.container}>
{getStackNavigator()}
<PrimaryBottomSheet />
</GestureHandlerRootView>
</PendoNavigationContainer>
</SafeAreaProvider>
</BottomSheetContext.Provider>
);
How do u initialize your navigationRef
?
"@react-navigation/native": "^6.0.10"
I also changed to your exact version 6.0.8
but still don't see the error
@bhandanyan-nomad any progress on it? Will it be ok if we close your ticket?
@bhandanyan-nomad I am closing the issue, feel free to ping us.
const navigationRef = useNavigationContainerRef();
nothing special there.
Have you specified global navigation param types as described here? This seems to be what is causing my issue, because as soon as I comment out the entire declare global
block those errors disappear.
Example app code:
I am getting typescript errors on both the "linking" and "ref" props: linking:
Type 'LinkingOptions<RootStackParamList> | undefined' is not assignable to type 'LinkingOptions<{}> | undefined'.
ref:Type 'NavigationContainerRefWithCurrent<RootParamList>' is not assignable to type 'Ref<NavigationContainerRef<{}>> | undefined'.
Both seem to be related to my app's param list object, which I defined following react navigation's recommendation here. I have yet to find a way to tell Pendo to use my param list, is it possible to do so with the current package?
Package versions: