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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Portal children always being mounted #1781
Conversation
f7a4835
to
be1eb45
Compare
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.
This is clever! Great job
Awesome fix @marvinhagemeister - this is the bug I just ran into :) Do you plan on making a |
@steffenmllr Good call, we should release another RC version soon. We need a bit more time on the docs site anyway. Th site is mostly ready and we're currently working on updating the content 馃帀 |
@marvinhagemeister sounds great! Is there an easy way to install from git master? |
if you npm install from a branch, then you will have to build. So you would have to include |
This PR fixes an issue where the children of a
Portal
component would always be treated as new children, leading to incorrectcomponentDidMount
calls. By switching to the raw preactrender
function we skip thedom
from being destroyed in an update scenario.The downside of this is that this definitely breaks the stacking scenario where multiple trees are rendered into the samedom
node. I'm wondering if we should reject that case in general and push rethinking root handling after the X release.Nevermind the stacking bit. Found a way to fix that too 馃帀
Fixes #1780