• Robert Knight's avatar
    Simplify and improve type safety of `watch` utility · 61b7e399
    Robert Knight authored
    Simplify the `watch` utility by making it only support a single callback to get
    the watched value, along with an optional comparison function to use to compare
    the results. To watch multiple values the callback can return an array and use a
    shallow-equality comparison.
    
    In `FrameSyncService` the lengthy callback passed to `watch` was
    extracted into a separate function to make the `watch` call more
    readable.
    61b7e399
watch.js 2.28 KB