mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-29 12:55:21 +08:00
feat: add a setParams method to update route params
This commit is contained in:
@@ -144,6 +144,12 @@ export type NavigationProp<
|
||||
(ParamList[RouteName] extends void
|
||||
? never
|
||||
: { params: ParamList[RouteName] });
|
||||
|
||||
/**
|
||||
* Update the param object for the route.
|
||||
* The new params will be shallow merged with the old one.
|
||||
*/
|
||||
setParams(params: ParamList[RouteName]): void;
|
||||
};
|
||||
|
||||
export type CompositeNavigationProp<
|
||||
|
||||
Reference in New Issue
Block a user