介紹

而不是使用按鈕膨脹包含導航器的主 js 檔案。在你需要的任何頁面中按需按需按鈕更簡潔。

//In the page "Home", I want to have the right nav button to show
//a settings modal that resides in "Home" component.

componentWillMount() {
  this.props.route.navbarTitle = "Home";

  this.props.route.rightNavButton = {
    text: "Settings",
    onPress: this._ShowSettingsModal.bind(this)
  };
}