Open sometao opened 6 years ago
example of Merge method in doc is:
Merge
* val r1: Rx[Int] * val r2: Rx[Int] * val merged: Rx[Int] = r1.merge(r2) * // r1 => 0 8 3 ... * // r2 => 1 4 3 ... * // merged => 0 8 4 3 3 ...
but, I run code below:
@JSExport def run(): Unit = { val a = Var(0) val b = Var(1) val c = a.merge(b) val body = { <div> <div>a:{a}</div> <div>b:{b}</div> <div>c:{c}</div> </div> } mount(dom.document.body, body) }
got result:
a:0 b:1 c:1
not what I expect:
a:0 b:1 c:0
Anything wrong here?
example of
Merge
method in doc is:but, I run code below:
got result:
not what I expect:
Anything wrong here?