0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

React Navigationによるヘッダーの入れ子状態を防ぐ方法

Last updated at Posted at 2018-06-17

はじめに

新卒エンジニア3ヶ月目、StackNavigatorやBottomTabNavigatorもそこそこふわっと理解してきた私は、調子に乗ってStackNavigatorとBottomTabNavigatorを組み合わせて遊んでいた。
そんな時、
スクリーンショット 2018-06-17 15.41.26.png
↑のようにヘッダが複数表示されてしまうことに気づいた。
StackNavigator上で設定されたヘッダがそのまま残ってしまい、BottomNavigator上のヘッダが適切に表示されてなくなっていたのだ。

解決策

別にどうということもなく

static navigationOptions = {
 header: null,
};

として元のヘッダを消してやればいいだけだった。おわり。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?