What does React do inside when a component's key changes, and why does that reset its state?
<ProfileForm key={userId} userId={userId} />
The answer
Answer it out loud first, the way you would in the interview. Then compare.
Checking your sign-in…