Function useNotifHandler

Subscribes a handler to a type of notification.