I believe it’s best to be freshly shaved. The hair will absorb the electric flash/shock and the smaller the hair, the less distance it has to travel to zap the root.
In the past, I have waited a day after shaving once before and when I zapped an area, I’d notice the distinct smell of burning hair.