hooks
hooks copied to clipboard
Fix generic type of useNavigationParam
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](https://user-images.githubusercontent.com/868317/109873547-81ee8180-7c33-11eb-9e6a-af180bf3f0dc.png)
With generic (helpful type):
![Screen Shot 2021-03-03 at 3 07 42 PM](https://user-images.githubusercontent.com/868317/109873612-99c60580-7c33-11eb-8ab3-d3aedbb346b5.png)
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)
@slorber is this repository dead ?
@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