There is a natural connection between two types of recurrence law: hitting times to shrinking targets, and hitting times to a fixed target (usually seen as escape through a hole). We show that for systems which mix exponentially fast, one can move through a natural parameter space from one to the other. On the other hand, if the mixing is subexponential, there is a phase transition between the hitting times law and the escape law.