介绍

而不是使用按钮膨胀包含导航器的主 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)
  };
}