You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to keep some logic in my event that should be triggered after dispatching is complete and the listeners have run (or been queued).
This would be particularly useful when listeners aren't queued and they have set values against the event class, I can then act on that rather than having to do it in multiple places after the event is fired wherever the event is called.
I have done this in my own project by overriding the dispatcher dispatch() method like below, but it would be nice if this was part of the framework.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to keep some logic in my event that should be triggered after dispatching is complete and the listeners have run (or been queued).
This would be particularly useful when listeners aren't queued and they have set values against the event class, I can then act on that rather than having to do it in multiple places after the event is fired wherever the event is called.
I have done this in my own project by overriding the dispatcher dispatch() method like below, but it would be nice if this was part of the framework.
Beta Was this translation helpful? Give feedback.
All reactions