I don’t understand why whatTimeIsIt is not updating in the DOM. Ideas?
The timer is ticking, I can set a breakpoint in the console and I see that whatTimeIsIt is changing…
@tracked whatTimeIsIt timerId = null updateWhatTimeIsIt() { this.whatTimeIsIt = (new Date()).toISOString() } constructor() { super(...arguments) this.updateWhatTimeIsIt() this.timerId = setInterval(this.updateWhatTimeIsIt, 1000 ) }
The display doesn’t update
<div>
<div>Timer</div>
<div>{{this.whatTimeIsIt}}</div>
</div>
4 posts - 2 participants