snabbdom: Reconcilation problem

I’m considering snabbdom as a virtual-dom replacement. I’ve hit some problem (or bug) with node reconcilation. It would require tons of words to explain without a video so here is one:

https://drive.google.com/file/d/0B9bW0B92XgnAbnM2LXNZYWZ6NzQ/view

The first half (game board with black top-left corner) features virtual-dom based code and the second half (game board without such corner) features snabbdom based code.

As you can see there, snabbdom reconciles a parent span.cell

<span class="cell" data-row="0" data-col="0">  <-- this one should not reconcile at card flip
  <span class="card flipper shaker" data-state="0">
    <span class="front">?</span>
    <span class="back">F</span>
  </span>
</span>

at the time child span.card is changing. This reconcilation is unnecessary because no attribute of the parent span.cell is changing. And it interrupts CSS transition destroying animation alltogether.

The code for both examples is obviously the same, only API stuff were touched.

virtual-dom version: https://github.com/Paqmind/memory-game/tree/styles snabbdom version: https://github.com/Paqmind/memory-game/tree/vdom-experiments

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (9 by maintainers)

Most upvoted comments

Sorry, I haven’t looked at this. Thank you for reminding me @AlexGalays and thanks to @bloodyKnuckles for the analysis 🏆

I’ll look at it in a few couple of days 🔜

Thank you for reporting this. This does indeed look like a bug. I’ll look into it.