3 ms·
I think the code you posted is much simpler, both conceptually and at the level of the code itself. We know what classes are, we know what render means. I thin
by draw_down 11y ago
I think the code you posted is much simpler, both conceptually and at the level of the code itself. We know what classes are, we know what render means.
I think the requirement to express markup as a tree of function calls is inelegant (JSX is no different, just shorthand for this) and my least favorite part of React, but I'll take inelegant over WTF any day.
- k__ 11y agoYou can also express markup as a tree of objects. https://github.com/kay-is/react-from-zero/blob/master/0-object-elements.html#L20 https://github.com/kay-is/react-from-zero/blob/master/0-obje...
- chris_wot 11y agoI'm not an Angular expert, and this isn't quite the same, but seems to show the same basic principles at play: var helloWorldApp = angular.module('helloWorldApp', []); HelloWorldApp.controller('HelloWorldController', function ($scope) { $scope.displayName = "HelloMessage" }); I believe you just add a directive to add a new element. Slightly more code, but the same concepts in play. React uses an MVC framework, only it doesn't use those exact words. Seems pretty much the same to me! Note that React may well be easier to understand, but its not because it doesn't use a singleton object to access an object factory created by a provider of factories (a factory that creates factories).