Add handleCancelledTransition hook