Files
component-party/content/3-lifecycle/2-on-unmount/alpine/index.html
Mathieu Schimmerling 6401ba12ea Revert "Merge pull request #73 from matschik/feat/required-react-import"
This reverts commit a69607362c, reversing
changes made to c17359e1e6.
2022-05-17 12:11:00 +00:00

7 lines
258 B
HTML

<p x-data="{
time: new Date().toLocaleTimeString(),
timer: null,
init() { this.timer = setInterval(() => (this.time = new Date().toLocaleTimeString()), 1000) },
destroy() { clearInterval(this.timer) }
}">Current time: <span x-text="time"></span></p>