Stop from receiving notifications
Whenever we add a hook in the store it always return a HookLink
instance that represents the link between the hook and the store. We can use it to stop our hook from getting notified on any dispatched action.
In this example we use the destroy
method to manually destroy the hook when it reach its 3rd invocation.
hookLink
is only available inside reducers after hook initial phase.
controller-d.js
Another method of HookLink
is destroyOn
. This method is used for auto destroying of hook. It basically bind the hook to AngularJS scope so when the scope destroyed also hook is get destroyed.
controller-d.js
Last updated