Add a didTransition hook