小编lon*_*an4的帖子

Wix react-native-navigation更改选项卡和推屏

如何同时切换选项卡和推屏?当按下按钮时,我想切换到另一个选项卡并按下一个新屏幕。可能吗?

class Example extends Component {
      buttonHandler = () => {
        this.props.navigator.switchToTab({
          tabIndex: 0
        });
        this.props.navigator.push({  // actually this navigator's tabIndex is 0 
          screen: "dc.Examplecreen",
          title: "Exampe", 
          passProps: {
            lesson : this.props
          }    
       });
   }
}
Run Code Online (Sandbox Code Playgroud)

javascript react-native react-native-navigation

5
推荐指数
2
解决办法
2313
查看次数