preact icon indicating copy to clipboard operation
preact copied to clipboard

Empty result of lazy component doubles next node

Open aleksandrjet opened this issue 2 years ago • 1 comments

I found a bug with empty result of lazy component. I could't fix it and opened pr with fallen test.

Perhaps this is not so easy to fix. Maybe add a notice to the documentation, that lazy component requires something to return (not null or empty fragment)?

aleksandrjet avatar Jul 24 '23 05:07 aleksandrjet

Hmm, yeah this would be indeed quite hard to fix as it seems a general issue with having no matching DOM for a given VNode during a suspended hydration, basically we want to match some kind of DOM to the suspended node while hydration is ongoing. We currently don't really have a way to see that the oldDom pointer has been consumed and that the future result of lazy will be a placeholder i.e. null

JoviDeCroock avatar Oct 14 '23 12:10 JoviDeCroock