-
Notifications
You must be signed in to change notification settings - Fork 27k
fix(core): clean up event contract once hydration is done #58174
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
Conversation
AndrewKushnir
left a comment
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.
18a0b83 to
d60da23
Compare
d60da23 to
88caa78
Compare
88caa78 to
2c9959d
Compare
2c9959d to
eec9e4a
Compare
eec9e4a to
b141989
Compare
b141989 to
f852f6b
Compare
f852f6b to
1bdfd1d
Compare
|
@arturovt I think we should be safe to land this now. Can you rebase and resolve the conflict? |
In this commit, we clean up the event contract once hydration is complete, which removes event listeners registered through the container manager. If we do not clean up the contract, the listeners will remain on the `document.body`. When incremental hydration is enabled, we cannot clean up the event contract immediately; instead, we schedule its cleanup when the app is destroyed. This is because the event contract is required for deferred blocks, of which we are unaware, that need to be hydrated.
1bdfd1d to
32bc96f
Compare
thePunderWoman
left a comment
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.
LGTM! Thanks!
In this commit, we clean up the event contract once hydration is complete, which removes event listeners registered through the container manager. If we do not clean up the contract, the listeners will remain on the `document.body`. When incremental hydration is enabled, we cannot clean up the event contract immediately; instead, we schedule its cleanup when the app is destroyed. This is because the event contract is required for deferred blocks, of which we are unaware, that need to be hydrated. PR Close #58174
|
This PR was merged into the repository by commit 4df352b. The changes were merged into the following branches: main, 19.0.x |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
In this commit, we clean up the event contract once hydration is complete, which removes event
listeners registered through the container manager. If we do not clean up the contract, the listeners
will remain on the
document.body. When incremental hydration is enabled, we cannot clean up the eventcontract immediately; instead, we schedule its cleanup when the app is destroyed. This is because the
event contract is required for deferred blocks, of which we are unaware, that need to be hydrated.