RentoMojo interview question

How does use state effect works