-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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@18] fix incorrect useEffect
return value
#195421
Conversation
Pinging @elastic/appex-sharedux (Team:SharedUX) |
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.
thanks! LGTM :)
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11239548084 |
(cherry picked from commit d03537f)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…95421) (#195468) # Backport This will backport the following commits from `main` to `8.x`: - [[React@18] fix incorrect `useEffect` return value (#195421)](#195421) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Anton Dosov","email":"anton.dosov@elastic.co"},"sourceCommit":{"committedDate":"2024-10-08T16:17:17Z","message":"[React@18] fix incorrect `useEffect` return value (#195421)","sha":"d03537f21764fda1fbafcfec03391b3e03b64e82","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","backport:prev-minor"],"title":"[React@18] fix incorrect `useEffect` return value","number":195421,"url":"https://github.com/elastic/kibana/pull/195421","mergeCommit":{"message":"[React@18] fix incorrect `useEffect` return value (#195421)","sha":"d03537f21764fda1fbafcfec03391b3e03b64e82"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195421","number":195421,"mergeCommit":{"message":"[React@18] fix incorrect `useEffect` return value (#195421)","sha":"d03537f21764fda1fbafcfec03391b3e03b64e82"}}]}] BACKPORT--> Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Summary
This is a prep for React@18 upgrade
When running functional tests with React@18 we've found places where
useEffect
function returns an object (related failure). This fails with a runtime error in React@18 as onlyundefined
or an unmount funciton is a valid return value