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):
With generic (helpful type):
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