The second parameter scheduler of effect
Description of Functionality
-
A function is passed as the second parameter of the
effect, and it is commonly referred to as thescheduler. -
The first parameter
fnof theeffectwill be called upon initialization (first execution). -
When the reactive object updates (
set), the functionfnwill not be executed directly; instead, theschedulerwill be invoked. -
When the
runnerfunction is called, it will execute the functionfnagain.