karaxnim / karax

Karax. Single page applications for Nim.
MIT License
1.05k stars 90 forks source link

`verbitam` content is appended every time it changes #273

Open hamidb80 opened 8 months ago

hamidb80 commented 8 months ago
include karax/prelude

var 
    text = "wow"
    counter = 1

proc createDom(): VNode =
  result = buildHtml(tdiv):
    verbatim text

    proc onclick = 
        text &= $counter
        inc counter

setRenderer createDom

What is Expected:

wow
wow1
wow12
wow123
wow1234
...

What is happening

wow
wowwow1
wowwow1wow12
wowwow1wow12wow123wow1234

I think #270 caused the problem, because 1.3.0 works fine but 1.3.1 does not

geotre commented 8 months ago

I've reverted the change for now