m3k_1
m3k_1

Reputation: 417

Is there a way to hide header title for react-navigation-drawer component

I'm making an app using react navigation-drawer for native, and I was wondering if it is possible to hide just the header title without hiding other things with for example

headerShown: false

Upvotes: 2

Views: 1884

Answers (2)

m3k_1
m3k_1

Reputation: 417

EDIT: I found the way to do it in options property of drawer screen you can set the headerTitle to ''

<Drawer.Screen name="Home" component={Home} options={{title: 'Home', headerTitle:''}}/>

the title is the name of the Screen shown in the drawer menu, and the headerTitle is of course the one shown on the top of the screen, on the header

Upvotes: 3

Voke Junior
Voke Junior

Reputation: 314

Yes, you can pass an empty string just like this

options={() => ({
          headerTitle: "",
 })}

Upvotes: 2

Related Questions