Navigation.registerComponent() does not register the JS component with a componentId. Issue found when attempting to displaying a react-native view inside of a native Android module (using ReactRootView).
Issue found with component registration:
Navigation.registerComponent(
"OtherView",
() => require("./OtherView").default
);
Navigation.events().registerAppLaunchedListener(() => {
Navigation.setRoot({
root: {
component: {
name: "init"
}
}
});
});
Then call in Android (java) to display component using ReactRootView:
mReactRootView.startReactApplication(mReactInstanceManager, "OtherView", getLaunchOptions());
Screenshot:

The issue is resolved by registering component with AppRegistry (before calling setRoot):
Navigation.registerComponent(
"OtherView",
() => require("./OtherView").default
);
AppRegistry.registerComponent("OtherView", () => OtherView);
Navigation.events().registerAppLaunchedListener(() => {
Navigation.setRoot({
root: {
component: {
name: "init"
}
}
});
});
seeing the same issue here
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
The issue has been closed for inactivity.