Closed sumi-svmx closed 2 years ago
Is your <NavigationContainer />
a parent of your <BottomSheetModalProvider />
?
@jhhayashi
Is your
<NavigationContainer />
a parent of your<BottomSheetModalProvider />
?
Yes, BottomSheetModalProvider
is wrapped inside NavigationContainer
App.tsx
render
return (
<NavigationContainer ref={navRef}>
<BottomSheetModalProvider>
<Root />
</BottomSheetModalProvider>
</NavigationContainer>
);
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
@sumi-svmx
Have you solved the issue? I'm getting the same error also.
I'm using workaround with NavigationService https://reactnavigation.org/docs/navigating-without-navigation-prop
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
I'm using workaround with NavigationService https://reactnavigation.org/docs/navigating-without-navigation-prop
Can you share your workaround?
If you
@jhhayashi
Is your
<NavigationContainer />
a parent of your<BottomSheetModalProvider />
?Yes,
BottomSheetModalProvider
is wrapped insideNavigationContainer
App.tsx
renderreturn ( <NavigationContainer ref={navRef}> <BottomSheetModalProvider> <Root /> </BottomSheetModalProvider> </NavigationContainer> );
Thanks
Bug
On wrapping a component that internally uses react-navigation hooks (eg,
useFocusEffect
,useNavigation
) withBottomSheetModal
, throws error"Couldn't find navigation object. Is your component in a screen inside navigator?"
. However, works on using withBottomSheet
component.Environment info
Steps To Reproduce
Describe what you expected to happen:
Reproducible sample code