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 can't find any resource / short explanation about when to use one-shot systems and when to use observers.
One-shot systems seem to be ordered in the schedule so observers theoretically act faster, but what is the real "when to use what" thing?
Should I always use observers as long as there isn't any important ordering needed? What would be such an important ordering?
And what about the additional Bundle generic on Trigger? At the first glance it looks like a fancy special thing for component hooks, but wouldn't a generic OnAdd::<MyComp> also do it's job? And can this be used for other / custom events?
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
-
I can't find any resource / short explanation about when to use one-shot systems and when to use observers.
One-shot systems seem to be ordered in the schedule so observers theoretically act faster, but what is the real "when to use what" thing?
Should I always use observers as long as there isn't any important ordering needed? What would be such an important ordering?
And what about the additional Bundle generic on
Trigger
? At the first glance it looks like a fancy special thing for component hooks, but wouldn't a genericOnAdd::<MyComp>
also do it's job? And can this be used for other / custom events?Beta Was this translation helpful? Give feedback.
All reactions