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

Imperatively Change Route Title #44

Closed
cancan101 opened this issue Nov 25, 2015 · 3 comments
Closed

Imperatively Change Route Title #44

cancan101 opened this issue Nov 25, 2015 · 3 comments

Comments

@cancan101
Copy link
Contributor

Provide a way to imperatively change the title shown in the ExNavigator for the current route.

@ide
Copy link
Member

ide commented Nov 25, 2015

The way to do this is to implement renderTitle with a custom view that has an imperative method. There are several possible transitions for setting a title (e.g. cross-fading, sliding in, fading out then fading in) so ExNavigator lets you implement whatever behavior is right for your app.

@ide ide closed this as completed Nov 25, 2015
@cancan101
Copy link
Contributor Author

@ide how do I get a reference to the view returned by renderTitle?

@ide
Copy link
Member

ide commented Nov 25, 2015

renderTitle={() => <View ref={c = { this._title = c; } />}

It's all standard React and JS all the way down.

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