0
votes

I am using react navigation in a react native project. I have a component with a header using navigationOptions.

I am trying to access the props to set a dynamic name but it seems they are undefined. I don't seem to be able to access them inside the navigationOptions object. Any clue?

1
Could you include your code in the question so we can see if there are any problems with the code? - Todd Chaffee
Welcome to StackOverflow! In order for folks to help you, you need to provide a little more information. Please see stackoverflow.com/help/mcve on how to create a Minimal, Complete, and Verifiable example, as well as stackoverflow.com/help/how-to-ask for some general guidance. - betseyb

1 Answers

0
votes

I realize this is an old question but for the sake of someone else wandering in here in search of help, you should take a look at the state and setParams documentation here:

https://reactnavigation.org/docs/navigation-prop.html