ReactNative跳转到指定页面

ReactNative像APP一样返回到指定页面

//得到Navigator的层级关系
var currentRoute = this.props.navigator.getCurrentRoutes();

for(var i = 0; i < currentRoute.length; i++){
  if(currentRoute[i].name  === '你想跳转的页面'){
      this.props.navigator.popToRoute(currentRoute[i]);
  }
}

你可能感兴趣的:(ReactNative跳转到指定页面)