-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Fix vnode DOM not existing #509
Conversation
🦋 Changeset detectedLatest commit: b621c1b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
The main reason why something like this could happen is becauase you are invoking replaceComponent
on a VNode which has exited the DOM. This is something you are doing as you are invoking replaceComponent
twice in the above. Removing the invocation where you remove previous and just doing replace(new, old)
it should work correctly.
EDIT: the tests fail as well for non-resetting behavior
Tried to remove the second replace but it's the first one that fails The first time ever that the code gets executed fails so in this case there is no double replace or anything like that This issue only happens on a specific file, so in all other files it's fine. To defend the double Btw you said |
I think the PR is still valid because it should not throw if possible, this literally fixes the issue and it allows the component to update correctly. It just that it would be cool to know exactly what is happening haha Thanks for the help! |
CI error seems unrelated because same one happened on main branch recently. Maybe if we re-run the CI several times |
Superseded by #514 apologies for the flaky tests, created an issue for that |
I'm getting this error:
I couldn't trace on how to minimally reproduce the error but it happens consistently
It could be an edge case bug or maybe it's my naive way of implementing live reload, it's more or less like so:
I'm always resetting the state there, and I didn't implement the signature comparison because it's too complex, but this has been working perfectly