Can the countdown timer be realized by using functional normal form?

as described in the title, the requirement is to make a page similar to making a phone call, which requires a countdown, which needs to be terminated in three cases:

  • 30 seconds unanswered is regarded as a timeout, and should be terminated
  • the answer needs to be terminated within 30 seconds
  • within 30 seconds, the user hangs up actively and terminates

in any case, I can"t figure out how to isolate side effects.

is there any code or pseudo code to refer to?

Mar.23,2021

Link description


call the function in the timer to take the state, and then deal with it accordingly. What exactly does the side effect refer to?


it would be tedious to isolate the side effects with native ones. I wrote a simple one with RxJS for inspiration

.

https://jsfiddle.net/straybug.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb26ac-481a7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb26ac-481a7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?