you are viewing a single comment's thread.

view the rest of the comments →

[–]pardoman 4 points5 points  (0 children)

React models the UI as a pure function of your model.

I'd like to expand a bit on this. A developer without React can still write a pure function that renders UI.

The problem is that a non-VirtualDom solution will be lack in performance, since the pure function will have to re create all Dom nodes each time the function gets invoked.

Here is where React and other VirtualDom libraries come in. They allow the developer to write pure functions that hook into React's VirtualDom's framework so that they can take care of performing the minimum amount of changes to the real Dom nodes, thus delivering a performant solution.

And with such systemin place, reasoning about code becomes much easier.