Skip to content

[react] Deprecate VoidFunctionComponent and VFC #59882

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

Merged

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Apr 13, 2022

VoidFunctionComponent is now equivalent with FunctionComponent.

Since the release of the React 18 types I haven't seen any use case for FunctionComponent with implicit children beyond "it breaks existing stuff".

If we need to restore implicit children on FunctionComponent we can always undeprecate VoidFunctionComponent.

@DangerBotOSS
Copy link

Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files.
The check for missing properties isn't always right, so take this list as advice, not a requirement.

react (unpkg)

was missing the following properties:

  1. unstable_act

Generated by 🚫 dangerJS against ea6fd74

@eps1lon eps1lon marked this pull request as ready for review April 13, 2022 16:52
@typescript-bot
Copy link
Contributor

typescript-bot commented Apr 13, 2022

@eps1lon Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because 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

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Only a DT maintainer can approve changes without tests

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"
}

@typescript-bot typescript-bot added Critical package Author is Owner The author of this PR is a listed owner of the package. Untested Change This PR does not touch tests labels Apr 13, 2022
@typescript-bot
Copy link
Contributor

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!

@typescript-bot
Copy link
Contributor

🔔 @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 Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Apr 13, 2022
@typescript-bot
Copy link
Contributor

@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:

Ready to merge

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.)

@eps1lon
Copy link
Collaborator Author

eps1lon commented Apr 13, 2022

Ready to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author is Owner The author of this PR is a listed owner of the package. Critical package Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner Untested Change This PR does not touch tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants