Or you could try RiotJS which appears to have heavily influenced Svelte, and is a lot more mature - it's on version 4 (version 5 is in alpha)and has been around since 2013. A similar timer component would be defined as follows:
<timer><p>Seconds Elapsed: { state.time }</p><script>exportdefault{tick(){this.update({time:++this.state.time})},onBeforeMount(props){// create the component initial statethis.state={time:props.start}this.timer=setInterval(this.tick,1000)},onUnmounted(){clearInterval(this.timer)}}</script></timer>
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Or you could try RiotJS which appears to have heavily influenced Svelte, and is a lot more mature - it's on version 4 (version 5 is in alpha)and has been around since 2013. A similar timer component would be defined as follows: