Answer the question
In order to leave comments, you need to log in
Why is dynamic header not working in react-native?
In this https://reactnavigation.org/docs/intro/ example, the dynamic header should work something like this:
static navigationOptions = ({ navigation }) => ({
title: `Chat with ${navigation.state.params.user}`,
});
Answer the question
In order to leave comments, you need to log in
Try like this:
...
componentWillMount() {
this.props.navigation.setParams({ user: "name" });
}
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question