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

Back prop to Scene is not functioning properly #2209

Closed
tbarmann opened this issue Aug 9, 2017 · 5 comments
Closed

Back prop to Scene is not functioning properly #2209

tbarmann opened this issue Aug 9, 2017 · 5 comments

Comments

@tbarmann
Copy link

tbarmann commented Aug 9, 2017

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta.17
  • react-native v0.46.1

Expected behaviour

Left button arrow should be hidden when using the back prop set to false on <Scene> component, according to the docs.

Actual behaviour

Button is showing:
image

Steps to reproduce

For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.

  1. Use the back prop set to false for a Scene component
  2. Render
  3. Back arrow is displayed and is functional

Here is my Router component's return:

    return (
      <Router>
        <Scene
          rightButtonTextStyle={styles.buttonTextStyle}
          navTransparent={true}
          rightTitle={rightTitleText}
          onRight={this.handleLogoutPress}
          key="root">
          <Scene
            key="login"
            back={false}
            component={Login} />
          <Scene
            key="profileLanding"
            initial={true}
            back={false}
            component={ProfileLanding} />
        </Scene>
      </Router>
    );
@aksonov
Copy link
Owner

aksonov commented Aug 10, 2017

Could you try to use init instead? Currently back is used to add back button, not to hide it. Need to improve docs.

@tbarmann
Copy link
Author

I don't see init in the docs. Can you explain?

@aksonov
Copy link
Owner

aksonov commented Aug 10, 2017

Just add init prop to Scene, it is not documented yet.

@aksonov
Copy link
Owner

aksonov commented Aug 10, 2017

More correct way is not to hide 'back', but use 'replace' action instead. Actually back now is kind of workaround of react-navigation bug where 'back' button is not properly determined.

@aksonov
Copy link
Owner

aksonov commented Aug 10, 2017

Closing it for now.

@aksonov aksonov closed this as completed Aug 10, 2017
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

2 participants