react training
extracting for reusability