-
Notifications
You must be signed in to change notification settings - Fork 15
more efficient ref.on and ref.off #17
Copy link
Copy link
Open
Labels
Description
current refs keep an array with each event
events:
type: [handler1, handler2]ref.off 'value' isn't called until events[type] is empty. when we could do ref.off 'value', handler1 and stop receiving those events immediately.
note this only affects refs with two listeners.
i think all of my code avoids this anyway by using multiple refs
document.get('property').on 'value', handler1
document.get('property').on 'value', handler2which would then use separate refs and this would be a non-issue
Reactions are currently unavailable