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

Navigator renders an old/stale NavigationBar #3754

Closed
despairblue opened this issue Oct 28, 2015 · 1 comment
Closed

Navigator renders an old/stale NavigationBar #3754

despairblue opened this issue Oct 28, 2015 · 1 comment
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@despairblue
Copy link
Contributor

In an attempt to show and hide the Navigator.NavigationBar at will I tried @hedgerwang's approaches from here. Sadly none of those work at the moment. The second one does not work since it's not possible to get a ref to the navigation bar. And the first one does not work because wrapping the NavigationBar seems to have the effect that an old navigation bar is rendered when the scene is rendered for the first time. I adapted the NavBar Example in the UIExplorer here. I wrapped the NavigationBar and printed the current scene's title to the console:

navbar

As can be seen, it's always rendering the title from the scene before. Forcing the scene to update renders the correct title. (I don't know why the screen recorder does not record the navigation buttons, they where there, so this is not a bug)

@despairblue
Copy link
Contributor Author

After reading the source more closely, I think I just forgot to expose the updateProgress method:

var NavigationBar = React.createClass({
  updateProgress (...args) {
    this.refs.navbar.updateProgress(...args)
  },

  render: function () {
    return <Navigator.NavigationBar
      ref='navbar'
      {...this.props}
      />
  }
})

@facebook facebook locked as resolved and limited conversation to collaborators Jul 21, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

2 participants