I was reviewing my Anki Grammar flashcards this morning when I noticed that なり and とたん can both mean "as soon as."
But when is it best to use one over the other? Is it just a matter of personal preference? Or is one more formal or more common than the other? Have you encountered this in anime, drama, or in your conversation with a native speaker before?