refactor: add route prop to the descriptor

This commit is contained in:
Satyajit Sahoo
2020-11-12 02:41:55 +01:00
parent 8a63f193bf
commit d5c091cbcf
2 changed files with 6 additions and 0 deletions

View File

@@ -334,6 +334,11 @@ export type Descriptor<
*/
options: ScreenOptions;
/**
* Route object for the screen
*/
route: RouteProp<ParamList, RouteName>;
/**
* Navigation object for the screen
*/

View File

@@ -144,6 +144,7 @@ export default function useDescriptors<
};
acc[route.key] = {
route,
navigation,
render() {
return (