Closed vomchik closed 4 years ago
Hi and thanks.
Can you explain what this is fixing and how did you test your code?
Not totally sure what are the impacts, and don't like the "any" context. In community typedefs, it is export const NavigationContext: React.Context<NavigationScreenProp<NavigationRoute>>;
@slorber Hi! The common issue it that lib directly import react-native
which contains import of native implementation https://github.com/react-navigation/react-navigation/blob/master/src/react-navigation.js#L2.
So i have changed import to react-native/core
.
also, I have updated the typings for the core module
We don't recommend libraries (or app code) to import from /core
as it can easily lead to duplicated instances of /core
leading to issues.
As a workaround, you can alias react-navigation
to @react-navigation/core
in your webpack config if that works for you.
I see. I'm using CRA, so I don't have access to webpack config. Also not really want to use tools for overriding a default config.
Should I close my PR?
@vomchik you can also try patch-package
to patch the import until we figure out a better way.
Cool! I will try it. Thanks.
Thanks, let's close this for now
This PR fix issue with a web version.
Related https://github.com/react-navigation/hooks/issues/59