react-native-module-template
react-native-module-template copied to clipboard
React Navigation error within the library
I am trying to create a StackNavigator instance inside the library index.tsx to test out the navigation capabilities. I am getting the below error. Has anyone got this working within a library?
Invariant Violation: requireNativeComponent: "RNSScreenStackHeaderConfig" was not found in the UIManager.
Dependencies "dependencies": { "@react-native-community/masked-view": "^0.1.11", "@react-navigation/native": "^6.0.8", "@react-navigation/native-stack": "^6.5.0", "react-native-gesture-handler": "^2.3.2", "react-native-reanimated": "^2.4.1", "react-native-safe-area-context": "^4.1.3", "react-native-screens": "^3.13.1" }
If I explicitly add all the npm packages in the example project it works fine but the dependencies from the library are not linked in the example project.
Not sure I understand - are you making a library that depends on all those libraries you mentioned above?