• Robert Knight's avatar
    Trigger a digest cycle after Redux action dispatches · b42d717b
    Robert Knight authored
    At various places in our code that receive external inputs (eg.
    WebSocket messages, messages from other frames etc.) we have to wrap
    that handling in a $scope.$apply() call or similar in order to trigger
    Angular's change detection cycle and sync UI components with the updated
    state of the app after handling that input.
    
    Since most changes to app state now happen as a result of a Redux action
    being dispatched, we can use Redux' built-in middleware mechanism for
    adding logic around app state changes.
    b42d717b
annotation-ui-controller-test.js 1.94 KB