To understand how React works, we need to look how it handles initial render of the view and how it manages updates. All work with view is made by React’s render function, which returns an exact description of your component at any point in time. When something changes, render method is called again and React in virtual DOM compares results and generates a minimal set of changes that is applied to the DOM. Pete Hunt from Facebook describes that process as reconciliation. To do that setState method needs to be called to trigger UI repaint (because React doesn’t do this by default).
There is another interesting addition – a new optional syntax extension called JSX. At first there were some critics about mixing logic and markup in one place but in the end it’s quite helpful.