Lines Matching refs:counter

1305   counter: number;
1307 this.counter = c;
1313 counter: number;
1316 this.counter++;
1319 this.subCounter.counter += c;
1322 this.subCounter.counter = c;
1326 this.counter = c;
1335 Text(`${this.value.counter}`)
1340 Text(`${this.value.subCounter.counter}`)
1351 …@State counter: ParentCounter[] = [new ParentCounter(1), new ParentCounter(2), new ParentCounter(3…
1355 CounterComp({ value: this.counter[0] })
1356 CounterComp({ value: this.counter[1] })
1357 CounterComp({ value: this.counter[2] })
1359 ForEach(this.counter,
1367 Text('Parent: incr counter[0].counter')
1370 this.counter[0].incrCounter();
1372 this.counter[0].incrSubCounter(10);
1375 Text('Parent: set.counter to 10')
1379 this.counter[0].setSubCounter(10);
1381 Text('Parent: reset entire counter')
1384 this.counter = [new ParentCounter(1), new ParentCounter(2), new ParentCounter(3)];
1392 …'Parent: incr counter[0].counter')**, **this.counter[0].incrSubCounter(10)** calls the **incrSubCo…
1394 However, when **this.counter[0].setSubCounter(10)** is called in **onClick** of **Text('Parent: set…
1396counter}')**. This is because \@ObjectLink **value: ParentCounter** can only observe the propertie…
1398counter[0].incrCounter()** is called for the first click event, it marks \@ObjectLink **value: Par…
1402 … to directly observe the properties in **SubCounter** so that the **this.counter[0].setSubCounter(…
1406 CounterComp({ value: this.counter[0] }); // ParentComp passes ParentCounter to CounterComp.
1413 …of the two classes can be observed and trigger UI update. Even if **this.counter[0].incrCounter()*…
1423 counter: number;
1426 this.counter = c;
1433 counter: number;
1437 this.counter++;
1441 this.subCounter.counter += c;
1445 this.subCounter.counter = c;
1450 this.counter = c;
1461 Text(`${this.value.counter}`)
1477 Text(`${this.subValue.counter}`)
1479 this.subValue.counter += 1;
1487 …@State counter: ParentCounter[] = [new ParentCounter(1), new ParentCounter(2), new ParentCounter(3…
1492 CounterComp({ value: this.counter[0] })
1493 CounterComp({ value: this.counter[1] })
1494 CounterComp({ value: this.counter[2] })
1496 ForEach(this.counter,
1503 Text('Parent: reset entire counter')
1506 this.counter = [new ParentCounter(1), new ParentCounter(2), new ParentCounter(3)];
1508 Text('Parent: incr counter[0].counter')
1511 this.counter[0].incrCounter();
1512 this.counter[0].incrSubCounter(10);
1514 Text('Parent: set.counter to 10')
1517 this.counter[0].setSubCounter(10);
1527 …ubCounter.counter** and **this.subValue.counter** change, and the corresponding component **Text(t…
1535 counter: number;
1538 this.counter = c;
1545 counter: number;
1549 this.counter++;
1553 this.subCounter.counter += c;
1557 this.subCounter.counter = c;
1562 this.counter = c;
1574 Text(`this.value.counter: increase 7 `)
1577 // Text(`this.subValue.counter: ${this.subValue.counter}`) is re-rendered after clicking.
1590 Text(`this.subValue.counter: ${this.subValue.counter}`)
1598 …@State counter: ParentCounter[] = [new ParentCounter(1), new ParentCounter(2), new ParentCounter(3…
1603 CounterComp({ value: this.counter[0] })
1604 CounterComp({ value: this.counter[1] })
1605 CounterComp({ value: this.counter[2] })
1607 ForEach(this.counter,
1614 Text('Parent: reset entire counter')
1617 this.counter = [new ParentCounter(1), new ParentCounter(2), new ParentCounter(3)];
1619 Text('Parent: incr counter[0].counter')
1622 this.counter[0].incrCounter();
1623 this.counter[0].incrSubCounter(10);
1625 Text('Parent: set.counter to 10')
1628 this.counter[0].setSubCounter(10);
1642 …(this.subValue.counter: ${this.subValue.counter})**, and the UI is re-rendered properly. However, …
1644 … copy object of **this.subValue**, and **Text(this.subValue.counter: ${this.subValue.counter})** i…
1653 Text(`this.subValue.counter: ${this.subValue.counter}`)
1656 this.subValue.counter += 7;
1658 Text(`this.value.counter: increase 7 `)
1677 - Use only one \@Prop **counter: Counter** in the **CounterComp** component.
1681 …ter** shares the same **SubCounter** object with **this.counter.subCounter** of \@Prop **counter: …
1690 counter: number;
1692 this.counter = c;
1699 counter: number;
1702 this.counter++;
1705 this.subCounter.counter += c;
1708 this.subCounter.counter = c;
1712 this.counter = c;
1721 Text(`SubCounterComp: this.subValue.counter: ${this.subValue.counter}`)
1723 this.subValue.counter = 7;
1732 Text(`this.value.incrCounter(): this.value.counter: ${this.value.counter}`)
1749 …@State counter: ParentCounter[] = [new ParentCounter(1), new ParentCounter(2), new ParentCounter(3…
1753 CounterComp({ value: this.counter[0] })
1754 CounterComp({ value: this.counter[1] })
1755 CounterComp({ value: this.counter[2] })
1757 ForEach(this.counter,
1764 Text('Parent: reset entire counter')
1767 this.counter = [new ParentCounter(1), new ParentCounter(2), new ParentCounter(3)];
1769 Text('Parent: incr counter[0].counter')
1772 this.counter[0].incrCounter();
1773 this.counter[0].incrSubCounter(10);
1775 Text('Parent: set.counter to 10')
1778 this.counter[0].setSubCounter(10);