Skip to main content

Setting up Header

We've already seen how to set the title in the Header, but let's take another look at that before moving on to some of the other options - repetition is the key to learning!

Set up title in Header#

The Screen component accepts an options option, which is either an object or a function that returns an object containing various configuration options. We use title as the title, as shown in the following example.

const StackScreen = () => {
return (
<Stack.Navigator>
<Stack.Screen
name="Home"
component={HomeScreen}
options={{ title: 'My home' }}
/>
</Stack.Navigator>
)
}

Try this example on Snack

Payment#

Now you are on a stripped-down version of the site, after subscribing to Patreon, you will get full access to the training course, as well as access to our server's private channels in Discord.

Download our mobile application or get tested in our JavaScript telegram bot, and also subscribe to our news.

Become a Patron!

Sumerian school

Links#

React Navigation

Contributors โœจ#

Thanks goes to these wonderful people (emoji key):


Dmitriy Vasilev

๐Ÿ“–๐Ÿ’ฒ

Become a Patron!