I found mutating the state can be very tricky and can possibly introduce a lot of problems. In this article, I am going to talk about the fundamental things you need to know about
setState(). This includes some properties of
setState() and detailed explanations about
setState() in different lifecycles.