A way to avoid having to create a ctx variable.
Evt.getCtx(obj) return an instance of Ctx<void>, always the same instance for a given object. Iternally it's a WeakMap<any, Ctx>.
Evt.getCtx(obj)
Ctx<void>
WeakMap<any, Ctx>
No strong reference to the object is created when the object is no longer referenced it's associated Ctx will be freed from memory.
Last updated 3 years ago
Was this helpful?