Difference between title and headerTitle in React Navigation

Viewed 881

Probably a stupid question but I can't figure out the difference between the properties title and headerTitle. I couldn't find anything useful in the documentation.

As far as I can see headerTitle will override title (e.g. here)

Is there a reason to set title when headerTitle is defined?

1 Answers

headerTitle is usually used to provide a custom header component ...

  <Stack.Screen
    name="Home"
    component={HomeScreen}
    options={{ headerTitle: props => <LogoTitle {...props} /> }}
  />

but title for changing text-only...

  <Stack.Screen
    name="Home"
    component={HomeScreen}
    options={{ title: 'My home' }}
  />
Related