5 ms·
The argument (among others) is that if you're going to be using if/else, for loops, and all that in a templating language you might as well use a full-featured
by firasd 10y ago
The argument (among others) is that if you're going to be using if/else, for loops, and all that in a templating language you might as well use a full-featured language like JavaScript... (youtube timestamp: https://www.youtube.com/watch?v=x7cQ3mrcKaY&t=4m13s https://www.youtube.com/watch?v=x7cQ3mrcKaY&t=4m13s)
- leeoniya 10y agoor, you know, just write the app in pure javascript and still reap the benefits of [2-3x faster than React] virtual dom. though i'm a bit biased [1] ;) [1] https://github.com/leeoniya/domvm https://github.com/leeoniya/domvm [2] http://mithril.js.org/ http://mithril.js.org/
- a13n 10y agoMeh since when is computational performance really a bottleneck? Do you find your site is loading seconds too slowly because JS is executing? I sure don't. On today's machines the much larger bottleneck is how fast and easily you can iterate on product at scale which is a problem that React is a fantastic solution for.
- pigeons 10y agoActually I do find javascript making many sites that are ultimately just displaying text, so slow as to be unusable.
- deleted 10y ago[deleted]
- leeoniya 10y ago> Meh since when is computational performance really a bottleneck? Ever used a phone that wasn't < 6 months old to browse the modern web? > at scale React is a front-end framework. The only "scale" that exists in its world is the fat DOM you generate and how fast it can mutate it. From that perspective, it sucks at scale (take a look at Preact and Inferno). Your iteration speed depends on good app architecture, not a specific framework. React Native does sound like a good perk, but likely isnt useful enough to make anything you cannot do anyway in HTML5.
- a13n 10y agoScale in terms of number of engineers and app size, not users
- leeoniya 10y ago> number of engineers can't this be said about any popular framework? "it scales because everyone knows it" > app size what specifically makes React scale better with app size than any other properly componentized architecture?
- a13n 10y agoIt doesn't scale because everyone knows it. It scales because React by nature isolates business logic into components so that for the most part 100 engineers can simultaneously work on the same product and be confident they aren't breaking stuff. (Or realize they are through merge conflicts) > "properly componentized" With React, 100 engineers don't have to know how to "properly componentize" things because it's already baked into the framework. You can't really write React code without proper componentization.
- leeoniya 10y ago> React by nature isolates business logic into components The essence is simply this: function MyView(model) { return template; } ...which can work with any view layer and the same 100 engineers. Especially if the model is an API with business logic around some immutable stream/state. The concept is simple enough to be described in one sentance :) > don't have to know how to "properly componentize" things I think you're overstating how difficult this problem is or forgetting that React's API must still be learned from documentation and examples.
- Bahamut 10y agoOn mobile, it matters a lot, especially older/low-end Android phones.