Replies: 1 comment · 7 replies
-
Since you have mutable EDIT: Also, notice that when we're talking about removing or de-spawning, the order of hooks & observers is not the same, observers run before the hooks. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm curious about the order things run when both a hook and an observer are scheduled to run, assuming both run commands and that the command queue is not empty. I found out the order was:
hook, observer, hook's commands, observer's commands, command queue
I thought since hooks are designed to maintain invariants, their commands would either be pushed to the end of the queue (and their use discouraged in that case) or that they would execute right after the hook itself but the observer runs in between. Is this correct ?
Beta Was this translation helpful? Give feedback.
All reactions