-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Do not detach child elements if parent element is about to be detached #2420
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
Do not detach child elements if parent element is about to be detached #2420
Conversation
# Conflicts: # packages/yew-macro/src/hook/body.rs # packages/yew-macro/tests/function_component_attr/hook_location-fail.stderr # packages/yew-macro/tests/function_component_attr/hook_location-pass.rs # packages/yew/src/functional/hooks/mod.rs # packages/yew/src/functional/hooks/use_context.rs # packages/yew/src/functional/hooks/use_effect.rs # packages/yew/src/functional/hooks/use_memo.rs # packages/yew/src/functional/hooks/use_reducer.rs # packages/yew/src/functional/hooks/use_ref.rs # packages/yew/src/functional/hooks/use_state.rs # packages/yew/src/functional/mod.rs # website/docs/migration-guides/yew/from-0_19_0-to-0_20_0.mdx
Visit the preview URL for this PR (updated for commit 461cf38): https://yew-rs-api--pr2420-no-child-detaching-i-ra93dpum.web.app (expires Sat, 05 Feb 2022 01:30:43 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
Almost the same commit as me in de7df26 (not yet in a PR, so feel free to merge this instead). |
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.
Looks good to me.
Just wondering, when is true
passed to detach
? I see the false
being passed almost everywhere.
Description
This pull request aims to minimise the number of DOM API calls when detaching a large number of elements from the DOM tree by only detaching the upper most parent element.
Checklist
cargo make pr-flow
(No, pr-flow is broken on macOS #2403)