4 ms·
All the React code I've written tends to be much more functional/declarative in nature than OO. When writing web frontend code, there is the giant blob of state
by jowiar 12y ago
All the React code I've written tends to be much more functional/declarative in nature than OO. When writing web frontend code, there is the giant blob of state known as the DOM that has to be dealt with in some way. More than anything else, React allows you to treat the view as "create a function that transforms data into DOM elements", handling the state diffs itself.
- kuni-toko-tachi 12y agoWhen MVC is expressed as a composition of functions - whose purpose is data transformation, it is an absurdly simple concept. Only MVC described in object-oriented terms is "hard". view(controller(model0,event0)) = representation