[internal] Bump React 19 in packages#44671
Closed
DiegoAndai wants to merge 2 commits intomui:masterfrom
Closed
Conversation
DiegoAndai
commented
Dec 6, 2024
|
|
||
| expect(container.firstChild.textContent).to.equal('light:2'); // 2 because of double render within strict mode | ||
| expect(container.firstChild.textContent).to.equal('light'); | ||
| expect(effectRunCount).to.equal(reactMajor >= 19 ? 2 : 3); |
Member
Author
There was a problem hiding this comment.
This test was recently added, that's why we didn't cover it before in #42824.
The previous approach didn't work with React 19, probably due to the changes to strict mode. The difference in events between 18 and 19 is the following:
render
render
run effect
-run effect (this one doesn't run in React 19)
render
render
run effectAnd for both, the last effect run wasn't being registered in the rendered content. That's why with React 18 the result was light:2 even though the effect runs 3 times. For React 19, the effect is runs 2 times.
fadfd86 to
db92587
Compare
Netlify deploy preview
Bundle size reportBundle size will be reported once CircleCI build #776920 finishes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR picks all the bumps from #42824 except those related to docs infra. This way, we won't have to revert the package's dependencies if issues in the docs infra are found.