This repository was archived by the owner on Dec 3, 2022. It is now read-only.
Fix generic type of useNavigationParam#71
Open
avery-pierce wants to merge 1 commit intoreact-navigation:masterfrom
Open
Fix generic type of useNavigationParam#71avery-pierce wants to merge 1 commit intoreact-navigation:masterfrom
avery-pierce wants to merge 1 commit intoreact-navigation:masterfrom
Conversation
|
@slorber is this repository dead ? |
Member
|
@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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes an issue where the return type
useNavigationParamwasn't meaningful (it just returnsany).Without generic (backwards compatibility):
With generic (helpful type):
As a side-effect, I think this also fixes #42 since you can now pass the
Ptype in theuseNavigationhook (it defaults to the unspecificNavigationParamstype)