Wipro interview question

How is react state updated?