Adding event handler component