Event emitter, but for hooks