Updated to show state before and after component