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

how pass data from component to title #2959

Closed
blackinitial opened this issue Mar 23, 2018 · 4 comments
Closed

how pass data from component to title #2959

blackinitial opened this issue Mar 23, 2018 · 4 comments

Comments

@blackinitial
Copy link

Version

Tell us which versions you are using:

  • react-native-router-flux v4.6.1
  • react-native v0.52.2

Expected behaviour

how to make title like picture, with place and date dynamic from component . catch data from scene component to title router ??

title

thanks

@Blapi
Copy link
Collaborator

Blapi commented Mar 23, 2018

https://github.com/aksonov/react-native-router-flux/blob/master/docs/API.md

Scene

renderTitle React.Component   React component to render title for nav bar

@Blapi Blapi closed this as completed Mar 23, 2018
@blackinitial
Copy link
Author

blackinitial commented Mar 24, 2018

ok, solved.
I use Actions.scene({ params: valueHere })

@igorsantos07
Copy link
Contributor

igorsantos07 commented Mar 29, 2018

Not sure if renderTitle solves this matter, but it was mentioned by OP - even though he solved in another way... Is it possible to set the title dynamically, from inside the Scene's component? E.g. my component's title is based on a field of a prop it receives.

Going to submit a PR with an example to illustrate this. Found how to do it:
renderTitle={({prop}) => 'List: ${prop.name}'}

@janaka120
Copy link

janaka120 commented Jul 23, 2018

@blackinitial How to access to params in the screen.

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

4 participants