Skip to content
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

React: experimental_useEvent -> experimental_useEffectEvent #64880

Merged
merged 1 commit into from
Mar 24, 2023

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Mar 24, 2023

CI red due to idiotWu/smooth-scrollbar#522

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

@typescript-bot
Copy link
Contributor

typescript-bot commented Mar 24, 2023

@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 failed
  • 🕐 Most recent commit is approved by a DT maintainer

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 64880,
  "author": "eps1lon",
  "headCommitOid": "7adffb6dee4a993e18b1fbe35b9b113a14864539",
  "mergeBaseOid": "94976793273991f9c3e3228fe971ec65a60cb2df",
  "lastPushDate": "2023-03-24T13:11:07.000Z",
  "lastActivityDate": "2023-03-24T15:40:14.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "react",
      "kind": "edit",
      "files": [
        {
          "path": "types/react/experimental.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react/test/experimental.tsx",
          "kind": "test"
        },
        {
          "path": "types/react/test/hooks.tsx",
          "kind": "test"
        }
      ],
      "owners": [
        "johnnyreilly",
        "bbenezech",
        "pzavolinsky",
        "ericanderson",
        "DovydasNavickas",
        "theruther4d",
        "guilhermehubner",
        "ferdaber",
        "jrakotoharisoa",
        "pascaloliv",
        "hotell",
        "franklixuefei",
        "Jessidhia",
        "saranshkataria",
        "lukyth",
        "eps1lon",
        "zieka",
        "dancerphil",
        "dimitropoulos",
        "disjukr",
        "vhfmag",
        "hellatan",
        "priyanshurav",
        "Semigradsky"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "dimitropoulos",
      "date": "2023-03-24T15:23:46.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 1482805060,
  "ciResult": "fail",
  "ciUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped/commit/7adffb6dee4a993e18b1fbe35b9b113a14864539/checks?check_suite_id=11787217211"
}

@typescript-bot typescript-bot added The CI failed When GH Actions fails Critical package Author is Owner The author of this PR is a listed owner of the package. labels Mar 24, 2023
@typescript-bot
Copy link
Contributor

@typescript-bot
Copy link
Contributor

@eps1lon The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review.

@@ -104,5 +104,5 @@ declare module '.' {
export const SuspenseList: ExoticComponent<SuspenseListProps>;

// tslint:disable-next-line ban-types
export function experimental_useEvent<T extends Function>(event: T): T;
export function experimental_useEffectEvent<T extends Function>(event: T): T;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export function experimental_useEffectEvent<T extends Function>(event: T): T;
/**
* @see https://github.com/facebook/react/blob/9c54b29b44d24f8f8090da9c7ebf569747a444df/packages/react/src/ReactHooks.js#L237
*/
export function experimental_useEffectEvent<T extends Function>(event: T): T;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what value this would add. Especially since the flow types are wrong.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, no problem. the value it would add is to point people to what this experimental thing actually does. not important.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link just pointed to the implementation calling the dispatcher. That's not actually telling what it was for. We almost always want to point to documentation not implementation.

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Mar 24, 2023
@eps1lon eps1lon merged commit d6c3b65 into DefinitelyTyped:master Mar 24, 2023
@eps1lon eps1lon deleted the feat/useEffectEvent branch March 24, 2023 15:48
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 Owner Approved A listed owner of this package signed off on the pull request. The CI failed When GH Actions fails
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants