[react] Deprecate VoidFunctionComponent and VFC#59882
[react] Deprecate VoidFunctionComponent and VFC#59882typescript-bot merged 2 commits intoDefinitelyTyped:masterfrom
VoidFunctionComponent and VFC#59882Conversation
|
Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files. react (unpkg)was missing the following properties:
|
|
@eps1lon Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PR
Code ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. You can test the changes of this PR in the Playground. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 59882,
"author": "eps1lon",
"headCommitOid": "ea6fd74dc6ef194dc74d8cb8611808a68ef69c9e",
"mergeBaseOid": "a574bec6112488893ca55fe25cec84b9ddfaac2f",
"lastPushDate": "2022-04-13T16:09:17.000Z",
"lastActivityDate": "2022-04-13T17:04:28.000Z",
"mergeOfferDate": "2022-04-13T16:59:30.000Z",
"mergeRequestDate": "2022-04-13T17:04:28.000Z",
"mergeRequestUser": "eps1lon",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "react",
"kind": "edit",
"files": [
{
"path": "types/react/index.d.ts",
"kind": "definition"
}
],
"owners": [
"johnnyreilly",
"bbenezech",
"pzavolinsky",
"ericanderson",
"DovydasNavickas",
"theruther4d",
"guilhermehubner",
"ferdaber",
"jrakotoharisoa",
"pascaloliv",
"hotell",
"franklixuefei",
"Jessidhia",
"saranshkataria",
"lukyth",
"eps1lon",
"zieka",
"dancerphil",
"dimitropoulos",
"disjukr",
"vhfmag",
"hellatan",
"priyanshurav"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "johnnyreilly",
"date": "2022-04-13T16:58:49.000Z",
"isMaintainer": true
}
],
"mainBotCommentID": 1098275482,
"ciResult": "pass"
} |
|
Hey @eps1lon, 😒 Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider adding tests to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you! |
|
🔔 @johnnyreilly @bbenezech @pzavolinsky @ericanderson @DovydasNavickas @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa @pascaloliv @Hotell @franklixuefei @Jessidhia @saranshkataria @lukyth @zieka @dancerphil @dimitropoulos @disjukr @vhfmag @hellatan @priyanshurav — please review this PR in the next few days. Be sure to explicitly select |
|
@eps1lon: Everything looks good here. I am ready to merge this PR (at ea6fd74) on your behalf whenever you think it's ready. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@johnnyreilly, @bbenezech, @pzavolinsky, @ericanderson, @DovydasNavickas, @theruther4d, @guilhermehubner, @ferdaber, @jrakotoharisoa, @pascaloliv, @Hotell, @franklixuefei, @Jessidhia, @saranshkataria, @lukyth, @zieka, @dancerphil, @dimitropoulos, @disjukr, @vhfmag, @hellatan, @priyanshurav: you can do this too.) |
|
Ready to merge |
VoidFunctionComponentis now equivalent withFunctionComponent.Since the release of the React 18 types I haven't seen any use case for
FunctionComponentwith implicitchildrenbeyond "it breaks existing stuff".If we need to restore implicit
childrenonFunctionComponentwe can always undeprecateVoidFunctionComponent.