reactiveUtils replacment for watchUtils.pausable

360
2
Jump to solution
08-18-2022 08:15 AM
RobertScheitlin__GISP
MVP Emeritus

In watchUtils there is the pausable method what is the equivalent for reactiveUtils? Do I need to add and remove the watchHandle?

0 Kudos
1 Solution

Accepted Solutions
AndyGup
Esri Regular Contributor

Hi Robert, correct, with reactiveUtils you would need to add or remove the WatchHandle. Or,  in the case of once() or whenOnce() since those return a Promise you would use AbortSignal. For the moment this is the most efficient pattern since the underlying API is tracking observable property access, rather than tracking individual values.

View solution in original post

0 Kudos
2 Replies
AndyGup
Esri Regular Contributor

Hi Robert, correct, with reactiveUtils you would need to add or remove the WatchHandle. Or,  in the case of once() or whenOnce() since those return a Promise you would use AbortSignal. For the moment this is the most efficient pattern since the underlying API is tracking observable property access, rather than tracking individual values.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Thanks Andy.

0 Kudos