mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-05-22 08:01:56 +08:00
fix: merge params on navigate in example
This commit is contained in:
@@ -156,7 +156,13 @@ const StackRouter: Router<CommonAction | Action> = {
|
||||
routes: [
|
||||
...state.routes.slice(0, index),
|
||||
action.payload.params !== undefined
|
||||
? { ...state.routes[index], params: action.payload.params }
|
||||
? {
|
||||
...state.routes[index],
|
||||
params: {
|
||||
...state.routes[index].params,
|
||||
...action.payload.params,
|
||||
},
|
||||
}
|
||||
: state.routes[index],
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user