react-native-portalize icon indicating copy to clipboard operation
react-native-portalize copied to clipboard

Couldn't find a navigation object

Open apperside opened this issue 3 years ago • 7 comments

Hello, I am using this library and it works pretty well, however I am experiencing a strange issue :

The app's root component is configured in this way

Screenshot 2021-05-21 at 15 09 37

So the <Host /> is inside a navigation context.

The Portal works and it's content is shown as desired, but if inside the components that I put inside the portal I use react-navigation's useNavigation, I get the following error:

Screenshot 2021-05-21 at 15 21 59

So it seems that the navigation context get loosed somewhere.

Am I doing something wrong o is it some sort of bug?

I am using the 1.0.7 version and These are my system's informations

System: OS: macOS 11.3.1 CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 3.44 GB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 12.18.3 - ~/.nvm/versions/node/v12.18.3/bin/node Yarn: 1.22.5 - ~/.yarn/bin/yarn npm: 6.14.6 - ~/.nvm/versions/node/v12.18.3/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4 Android SDK: API Levels: 23, 25, 26, 27, 28, 29, 30 Build Tools: 23.0.1, 26.0.3, 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3 System Images: android-30 | Google APIs Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 4.0 AI-193.6911.18.40.6626763 Xcode: 12.5/12E262 - /usr/bin/xcodebuild Languages: Java: 1.8.0_242-release - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.4 => 0.63.4 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

apperside avatar May 21 '21 13:05 apperside

Did you manage to find a solution to this @apperside? I've got exactly the same problem

IPWright83 avatar Jun 21 '21 09:06 IPWright83

Same here

wolframus avatar Nov 19 '21 08:11 wolframus

Honestly I don't remember @wolframus , I should look back at the project I was working on in June

apperside avatar Nov 20 '21 08:11 apperside

same issue here any update @apperside @IPWright83

Chasty avatar Jul 04 '22 19:07 Chasty

@Chasty sorry, no longer working on that project/at that company

IPWright83 avatar Jul 04 '22 20:07 IPWright83

Simulator Screen Shot - iPhone 13 - 2022-08-10 at 15 39 08 i got this problem, can someone help?

fukemy avatar Aug 10 '22 08:08 fukemy

Is there a solution for this issue

VishnuNCS avatar Nov 23 '22 02:11 VishnuNCS