我在document中发现了一些东西。
看起来有些相关。希望对您有所帮助。
...
onNavigationStateChange = async (prevState,currentState,action) => {
this.state = currentState;
this.prevState = prevState;
const activeState = getActiveState(this.state);
const currentScene = activeState.routeName;
this.currentParams = { ...activeState.params,...action.params }; //Here!!
this.currentScene = currentScene;
this.prevScene = this.prevState ? getActiveState(this.prevState).routeName : null;
if (this.currentScene !== this.prevScene) {
// run onExit for old scene
this.onExitHandler(this.prevScene);
setTimeout(() => this.dispatch({
type: ActionConst.FOCUS,routeName: this.currentScene,params: this.currentParams,}));
this.onEnterHandler(currentScene);
}
...
本文链接:https://www.f2er.com/2529664.html