react-native - RNRF - Actions.popTo 失败:“使用未知的 routeName 调用”
问题描述
库版本
"react-native-router-flux": 4.1.0-beta.4
"react": "16.8.3",
"react-native": "^0.59.9"
我试图打电话Actions.popTo(sceneKey)
,但它给了popTo called with an unknown routeName: pulsaScreen
。我想要弹出的愿望屏幕是pulsaScreen
当我登录Actions.prevState.routes
并给出结果时:
[ { params:
{ error: '',
navigationBarStyle: { backgroundColor: '#FD6542', borderBottomWidth: 0 },
leftButtonType: 'GO_TO_HOME_BUTTON',
rightButtonType: 'CHAT_BUTTON_WITHOUT_LABEL',
title: 'Beli Pulsa',
navTransparent: false,
titleStyle:
{ .... },
renderBackButton: null,
renderLeftButton:
{ '$$typeof': {},
... },
renderRightButton:
{ '$$typeof': {},
... },
init: true,
product_type: 1,
type: 'reset',
routeName: 'pulsaScreen' },
routeName: 'pulsaScreen',
key: 'id-1572259438287-3' },
{ params:
{ error: '',
navigationBarStyle: { backgroundColor: '#FD6542', borderBottomWidth: 0 },
leftButtonType: 'BACK_BUTTON',
rightButtonType: 'CHAT_BUTTON_WITHOUT_LABEL',
title: 'Review',
navTransparent: false,
titleStyle:
{ ... },
renderBackButton: null,
renderLeftButton:
{ '$$typeof': {},
.... },
renderRightButton:
{ '$$typeof': {},
... },
init: true,
routeName: 'reviewPulsaScreen' },
routeName: 'reviewPulsaScreen',
key: 'id-1572259438287-4' },
{ params:
{ error: '',
navigationBarStyle: { backgroundColor: '#FD6542', borderBottomWidth: 0 },
title: 'Masukkan Pin',
leftButtonType: 'BACK_BUTTON',
rightButtonType: 'CHAT_BUTTON_WITHOUT_LABEL',
navTransparent: false,
titleStyle:
{ .... },
renderBackButton: null,
renderLeftButton:
{ '$$typeof': {},
... },
renderRightButton:
{ '$$typeof': {},
... },
init: true,
routeName: 'pinInputScene' },
routeName: 'pinInputScene',
...
key: 'id-1572259438287-5'
pulsaScreen
存在于我记录的路由堆栈上。
任何想法?
解决方案
直到现在,我都不知道答案。但是,我不小心使用Actions.jump()
了它,它按我的预期工作。
虽然,在文档中,Actions.jump()
只能用于Tab
推荐阅读
- python - 将较小的 np 数组添加到空的大型 np 数组中
- oracle - 检查嵌套表中是否包含值的 PLSQL 过程
- hyperledger-fabric - 基于自己的 hyperledger-fabric 架构创建业务网络 .bna
- python - 查看渲染/HttpResponse
- c++ - 多线程计算均值和标准不提高效率
- vue.js - Vue将事件处理程序传递给一个组件到另一个组件-事件“updatefilters”的处理程序无效:未定义
- php - fetch 在 Web 通知推送中返回未定义的错误
- android - 将应用程序发布到 Playstore 时出现此错误
- jsf - 如何在 JSF 中的不同页面和 beas 之间传递对象?
- libgdx - why ChainShape body is not falling on ground?