Closed osdevisnot closed 4 years ago
@osdevisnot Is this outdated? Just checking because of https://github.com/jorgebucaran/superfine/issues/172#issuecomment-530859774.
I was attempting to present alternative solutions. This one in particular is untested for SSR, so I won't consider merging this unless we know SSR works correctly.
@jorgebucaran I would like to see if this approach would work for SSR scenarios. Do you have WIP tests that I can use. If not, I can try importing relevant tests from V6.
Also, for root node semantics, did we have strong reason to replace vs append? The reason I ask is because it's a bit untraditional to follow the later.
@osdevisnot I don't want to append. I want to replace (recycling if possible).
Got it, I'm guessing it brings obvious advantages which I am definitely missing here. If it's not an hassle, do you mind enlightening me on 'why' part of replace vs append?
I want to take over an HTML node and replace it with my own view. My view can be anything I want or it can be the same as existing HTML content in the document to take advantage of Superfine's recycling.
I also want to find a solution to #172, but not by changing Superfine's default patch behavior. What other options do we have?
This is one possible fixe for #172. We change patch semantics to use append to container like in v6
I assume this will break SSR as recycling might need more work. But without tests added to V7 branch, I can't tell this certainly.
I will try to create another PR which will play with replace container mode.