-
Notifications
You must be signed in to change notification settings - Fork 47k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: have Context.Provider throw error if missing value
prop
#19020
Comments
I think it does make sense to warn if |
@heath-freenome I would love to take it if you don't mind, it's that okay? |
This issue is all yours, @brunogonzales I've added the "good first issue (taken)" label so that others will know not to start work on the issue. If you change your mind about the issue, no worries! Just let me know so that I can remove the label and free it up for someone else to claim. Cheers! |
@brunogonzales go for it! I wouldn't have time to get to it for a month at least. Please tag me on the PR as I would love to see the solution. |
@brunogonzales Have you started working on it ?? 😅 |
@charlie1404 you can totally take this off my hands, I haven't started working on it yet. Please tag me on your PR as I would like to know the solution too. |
@bvaughn How to get reviewers added on pr ? |
Hi! Is this issue still open and available? I would be happy to take it up if no one is working on it ATM. |
This was fixed in #19054 and released in React 17 Realease Candidate. We just forgot to close this issue. |
Just about every time I set up a new
Context.Provider
, I end up accidentally specifying avalues
prop rather thanvalue
. While it's a minor error, generally I build the container in which the provider resides and commit it to the code base before I ever use it. It's only later when I go to use it that I realize I did it again. Since theContext.Provider
seems pretty much useless without avalue
prop specified, I'd love it if there was a prop error if it is missing... especially if another prop is defined on theContext.Provider
instead.The text was updated successfully, but these errors were encountered: