-
-
Notifications
You must be signed in to change notification settings - Fork 148
Conversation
I think this makes sense! |
removed unnecessary comments
Only thing we'll need is to have it also remove extra elements that may have been contained in <div id="app">
<section id="root">to be rendered by preact-compat</section>
<p>should be removed since it's not in the vtree</p>
</div> render(<section id="root">rendered</section>, $('#app'));
console.log( $('#app').children.length ); // 2, should be 1 (or at least this is my understanding of what React seems to do) |
@developit, I have added a test that I believe covers this case. Please see the updated code. |
Might be an issue with multiple node removal here. I don't mind tweaking it after merge if you're getting the desired result though, I really appreciate your work on this! |
Good point, I will fix it. I also realized that textnodes in the |
Indeed! Switching to |
Alright, I think this covers my use cases. tweak as necessary. |
Looks great, I'll merge as soon as I have a sec! |
cool, glad to hear it. |
I would love to see this getting merged! 😃 |
Released as 3.0.0! 🎉 |
Fixes #145