Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when have one more AppRegistry.registerComponent ,switch them ,it wont work #52

Open
yutianhaijiao opened this issue Nov 22, 2019 · 7 comments

Comments

@yutianhaijiao
Copy link

AppRegistry.registerComponent("xx", () => xx);
AppRegistry.registerComponent("yy", () => yy);
in this case ,when i am only in xx ,it is work ok. but when i am from xx to yy, then back xx, it wont show anything

@GreyGao
Copy link

GreyGao commented Dec 9, 2019

the same issue

@GreyGao
Copy link

GreyGao commented Dec 9, 2019

@yutianhaijiao I think I fix it use <RootSiblingParent> wrap the App.js:

  <Provider store={globalStore}>
        <ThemeProvider theme={theme}>
          <RootSiblingParent>
            <View style={{ flex: 1 }}>
              <AppContainer ref={(navigatorRef) => { NavigationService.setTopLevelNavigator(navigatorRef); }} />
            </View>
          </RootSiblingParent>
        </ThemeProvider>
      </Provider>

@yutianhaijiao
Copy link
Author

@GreyGao Thanks ,it is good for work .but I do not understand why

@wscotten
Copy link

Thank you so much! This solved our issue.

@tastafur
Copy link

tastafur commented Mar 6, 2020

Hello,

Test with jest render app, it's not work, I've tried to mock him and I have not been able.

Captura de pantalla 2020-03-06 a las 13 18 27

Thanks

@godot007
Copy link

4.x有BUG。使用3.1.2以上就行了。

@mouxuefei
Copy link

有人和react-native-navigation一起吗,没法实现全局

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants