mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-01-12 22:51:18 +08:00
refactor: add route prop to the descriptor
This commit is contained in:
@@ -334,6 +334,11 @@ export type Descriptor<
|
||||
*/
|
||||
options: ScreenOptions;
|
||||
|
||||
/**
|
||||
* Route object for the screen
|
||||
*/
|
||||
route: RouteProp<ParamList, RouteName>;
|
||||
|
||||
/**
|
||||
* Navigation object for the screen
|
||||
*/
|
||||
|
||||
@@ -144,6 +144,7 @@ export default function useDescriptors<
|
||||
};
|
||||
|
||||
acc[route.key] = {
|
||||
route,
|
||||
navigation,
|
||||
render() {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user