Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3736236
D5397.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D5397.diff
View Options
diff --git a/native/flow-typed/npm/@react-navigation/native_v5.x.x.js b/native/flow-typed/npm/@react-navigation/native_v5.x.x.js
--- a/native/flow-typed/npm/@react-navigation/native_v5.x.x.js
+++ b/native/flow-typed/npm/@react-navigation/native_v5.x.x.js
@@ -2228,21 +2228,32 @@
* Linking
*/
+ declare export type LinkTo<
+ ParamList: ParamListBase,
+ RouteName: $Keys<ParamList>,
+ > =
+ | string
+ | {| +screen: RouteName, +params?: $ElementType<ParamList, RouteName> |};
+
declare export var Link: React$ComponentType<{
- +to: string,
+ +to: LinkTo<>,
+action?: GenericNavigationAction,
+target?: string,
+children: React$Node,
...
}>;
- declare export function useLinkTo(): (path: string) => void;
+ declare export function useLinkTo<ParamList: ParamListBase>(
+ ): (path: LinkTo<ParamList,>) => void;
- declare export function useLinkProps<To: string>(props: {|
- +to: To,
+ declare export function useLinkProps<
+ ParamList: ParamListBase,
+ RouteName: $Keys<ParamList>,
+ >(props: {|
+ +to: LinkTo<ParamList, RouteName>,
+action?: GenericNavigationAction,
|}): {|
- +href: To,
+ +href: string,
+accessibilityRole: 'link',
+onPress: (MouseEvent | PressEvent) => void,
|};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 5:43 AM (15 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2845704
Default Alt Text
D5397.diff (1 KB)
Attached To
Mode
D5397: [native] [4/34] ReactNav6: update LinkTo to accept screen name
Attached
Detach File
Event Timeline
Log In to Comment