-
Notifications
You must be signed in to change notification settings - Fork 239
Description
Hi
not sure if it is ok to post questions/doubts here. Please point me to a better suited place if that's the case. Quite new to this library, thanks for maintaining it.
I was wondering: in init(config) I pass some functions as onShow and onClose handlers. Those function keep references on some object instance I'd like to release at some point. Is there any way I can unregister what has been passed in init()? I checked init() return type but is void.
Ideally there could be some return value shaped like (pardon naming):
type InitUnsubscribe = {
removeOnShow: () => void;
removeOnClose: () => void;
};So that one stores a references to that return value, and later on call returnValue.removeOnShow() to remove one of the listeners. Basically for each one of the couple there should be its own unsubscribe/unregister/removeListener function (where removeListener would be the least preferable).
Ok, apart from my wandering, is it possibile to unregister those as of today?
Thanks!