Closed Bartozzz closed 5 years ago
Thanks for reminding. Should be fixed in https://github.com/magicismight/react-native-root-siblings/commit/3aff9e68740f8359057297b103fbd48556b1addb . Please reinstall to see if it works.
Updated packages and it everything works correctly so far.
Problem
If
react-native-root-siblings
gets loaded multiple times (i.e. is required by multiple libraries), each instance will override previousAppRegistry.setWrapperComponentProvider
calls.Because of that, only one
<RootSiblings />
element will be rendered in the application. It prevents the render of<RootSiblings />
required by other libraries.I believe this can actually happen in other basic scenarios, for example when an application simply needs to provide its own
AppRegistry.setWrapperComponentProvider
. It will prevent all the siblings from displaying at all.Potential solution
A potential solution would be to store the siblings in some sort of global storage across React-Native and ensuring the
<RootSiblings />
gets rendered forcing the developers to manually rendering it in the entrypoint (for exampleApp.js
).Related issues
Related issues found so far (besides the one we are experiencing at our company):