@nonopolarity All the answers are focusing on just replying to a part of your question i.e. why does react use a virtual dom. But what about the question that After the text changed to “hi” in the actual DOM why did react not change the text back to its original state when the button is clicked after 3 seconds? The virtual dom in react’s memory would have the original text then why didn’t it change in the re-rendering?