Reputation: 3758
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?
Upvotes: 5
Views: 2683
Reputation: 6752
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' }}
/>
Upvotes: 5