-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Conversation
82877e1
to
7adffb6
Compare
@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
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"
} |
🔔 @johnnyreilly @bbenezech @pzavolinsky @ericanderson @DovydasNavickas @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa @pascaloliv @Hotell @franklixuefei @Jessidhia @saranshkataria @lukyth @zieka @dancerphil @dimitropoulos @disjukr @vhfmag @hellatan @priyanshurav @Semigradsky — please review this PR in the next few days. Be sure to explicitly select |
@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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
CI red due to idiotWu/smooth-scrollbar#522
Please fill in this template.
npm test <package to test>
.Select one of these and delete the others:
If changing an existing definition:
[ ]If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.