hooks icon indicating copy to clipboard operation
hooks copied to clipboard

Fix generic type of useNavigationParam

Open avery-pierce opened this issue 3 years ago • 2 comments

This fixes an issue where the return type useNavigationParam wasn't meaningful (it just returns any).

Without generic (backwards compatibility):

Screen Shot 2021-03-03 at 3 08 07 PM

With generic (helpful type):

Screen Shot 2021-03-03 at 3 07 42 PM

As a side-effect, I think this also fixes #42 since you can now pass the P type in the useNavigation hook (it defaults to the unspecific NavigationParams type)

avery-pierce avatar Mar 03 '21 21:03 avery-pierce

@slorber is this repository dead ?

Aure77 avatar Feb 11 '22 10:02 Aure77

@Aure77 yes, I don't have time to work on it so please reach out to other React-Navigation contributors to see if anyone is willing to backport changes to this older package

Remember that you can always fork and you are never 100% locked

slorber avatar Feb 16 '22 18:02 slorber