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

Unable to nest navigators without creating new navigators due to screen component being created #7

Open
cem2ran opened this issue Oct 1, 2018 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@cem2ran
Copy link

cem2ran commented Oct 1, 2018

Currently it seems that intermediary screen components are created due to the screen parameter in routes being interpreted as a react functional component.

image

function route(screen, path, navigationOptions, _) {
  return {
          screen: (function (props) {
              var navigation = props.navigation;
              var state = Navigation$BsReactNavigation.stackState(navigation);
              return Curry._3(screen, navigation, state[/* params */2], props.screenProps);
            }),
          path: Js_undefined.fromOption(path),
          navigationOptions: Js_undefined.fromOption(navigationOptions)
        };
}

This issue triggers the following warning and breaks the ability to navigate across navigators:
You should only render one navigator explicitly in your app, and other navigators should by rendered by including them in that navigator. Full details at:
https://reactnavigation.org/docs/common-mistakes.html#explicitly-rendering-more-than-one-navigator

@baransu
Copy link
Owner

baransu commented Oct 8, 2018

Yes. That's an actual issue. We want to have intermediate step to convert JS navigation screen props to Reason component which accepts props as function arguments instead of object. I don't know how to solve this issue right now. Maybe some escape with JS HoC accepting Reason component. I'm not sure when I'll have time to check this.

@baransu baransu added bug Something isn't working help wanted Extra attention is needed labels Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants