How to type a custom LinkComponent that uses useLinkProps hook?

Viewed 37

In the React Navigation documentation the Link component receives a bunch of parameters and some are passed to the useLinkProps hook. What types am I supposed to use to type these parameters?

I've looked into the source code of the Link component but when typing the to parameter it imports the To type from @react-navigation/native/lib/typescript/src/useLinkTo, and based on the length of the import I'd assume that this wouldn't be an official way to type the parameter.

0 Answers
Related