React Navigation in Functional Components

Set header title in stack navigator

Component.navigationOptions = {
  headerTitle: 'Conversations'

headerTitle is a property that is specific to stack navigator. The alternative is title. headerTitle will default to title in other navigators.

or a callback function if you wanna use params (e.g. username in title)

Home.navigationOptions = ({ navigation }) => {(
    title: navigation.getParam('otherParam', 'A Nested Details Screen'),