title: How to force Mithril to redraw without diffing? (integrating dragula in Mithril)
body: <p>I am translating a JQuery-based app to Mithril. That app uses Dragula to allow drag/drop to reorder lists.</p>
  
  <ul>
  <li>Dragula reorders the <code>li</code> elements in the DOM. </li>
  <li>When the Drop event is fired, I sync the model and call m.redraw().</li>
  </ul>
  
  <p>However, the UI ends up in a mixed state:</p>
  
  <pre><code>&lt;li data-idx="0"&gt; The Zero &lt;/li&gt;
  &lt;li data-idx="1"&gt; The One &lt;/li&gt;
  </code></pre>
  
  <p>and after user dragging 1 before 0, it ends up as:</p>
  
  <pre><code>&lt;li data-idx="1"&gt; The One&lt;/li&gt;
  &lt;li data-idx="0"&gt; The Zero&lt;/li&gt;
  </code></pre>
  
  <p>Tried:</p>
  
  <ul>
  <li><p>m.redraw(), m.redraw.sync(), they correctly work but if ie. the LIs are moved by dragula, then the resulting HTML is in a mixed state.</p></li>
  <li><p>clearing <code>dom</code> in <code>vnode</code> with the hope it would be recreated.</p></li>
  <li>clearing <code>vmode.dom.textContent</code></li>
  <li>Assign random keys and IDs to the widget container, and to the different LIs</li>
  </ul>
  
  <p>... And nothing changes, either I get a blank widget or the values in "data-idx" are still wrong.</p>
  
  <p>So my question is, in general, is it possible, and how, to use these kind of libraries that manipulate a mithril widget inner html, and then call m.redraw() so mithril re-renders the mess  ? </p>
  
  <p>Background:</p>
  
  <ul>
  <li>Dragula is initialized in oncreate</li>
  <li><p>My widgets are mounted with route:</p>
  
  <p>"/videos": {</p>
  
  <pre><code>    onmatch: () =&gt; loginWall(true),
      render: v =&gt; m(layoutWidget, m(videosWidget, v.attrs))
  },
  </code></pre></li>
  </ul>