3 ms·
The first seems to add new DOM nodes with text on every click. The second one doesn't. So they don't seem to be equivalent.
by Matthias247 8y ago
The first seems to add new DOM nodes with text on every click. The second one doesn't. So they don't seem to be equivalent.
- renegadus 8y agoHmm, it seems to be adding things to a list but where is it adding a new DOM node?
- Matthias247 8y agoI would say in for x in lines: tdiv: text x Whenever the DOM gets rerendered, it iterates over the the lines (or the "model" in general), and creates DOM elements from it. At least it looks very similar to React and Angular code, and they do exactly this.
- renegadus 8y agoAh, you're right. Ok, I think I can do that fairly concisely in Kweb also, if I find a bit of time.