componentize event and extract from app def