3 ms·
> React was a blessing for the few creating apps that needed more than jquery, and that AngularJS 1 couldn't handle for perfs reason. performance was the least
by ctvo 2y ago
> React was a blessing for the few creating apps that needed more than jquery, and that AngularJS 1 couldn't handle for perfs reason.
performance was the least attractive reason for adopting React. React introduced composition as the default way of thinking about UIs to the web. You created components and used them to build more complex components. Data was immutable and flowed in one direction (parent component -> child component).
Comparing the above to ng with its dependency injection, MVC style approach to UIs, that used HTML based annotations and tags to sprinkle in functionality (`ng-if` baby) -- it was a much more simple way to build web applications.
React's style of building UIs has largely won. Vue, etc. all follow this component with composition view of the world.
> React sucked for years, with a terrible doc, a crippling webpack experience and breaking compact all the time.
Webpack has nothing to do with React. React has always had good documentation. The reason the documentation was good in the beginning was because the API surface area was tiny compared to Backbone, Ember, ng, etc..
I'm not going to go point by point here. You sound like you have a very superficial understanding of the space.
I'm going to hard pass on clicking a marketing link to your blog.
- BiteCode_dev 2y agoThe simple fact you say > React has always had good documentation Tells me you rewrite the entire history. In fact, for years, react didn't even tell in the doc you could use it without a transpiler so people had to learn a whole build chain before even getting to the hello world. At this stage it's not "superficial understanding of the space" this kind of comment is guilty of, it's total denial. And by the way, we have been doing components for UI way before react was a thing. jQuery could do components. Backend frameworks could do components. As for immutable data, I've seen more small projects die from the small cuts of trying to maintain that purity that I've seen those exploiting the benefits like free time travel. I assume you've been living HN bubble for too long.
- ctvo 2y agoYou know you can just check before making these claims. It helps with credibility. > In fact, for years, react didn't even tell in the doc you could use it without a transpiler so people had to learn a whole build chain before even getting to the hello world. React's original documentation site from June of 2013 (when React was first introduced): https://web.archive.org/web/20130607085014/http://facebook.github.io/react/docs/syntax.html https://web.archive.org/web/20130607085014/http://facebook.g... > JSX is a JavaScript XML syntax transform recommended (but not required) for use with React. It goes on to explain exactly what JSX is and how it converts to JS functions. Feel free to click around that original documentation site. Here's the README.md from the commit at the same time: https://github.com/facebook/react/tree/a41aa76ef36471ba07b29278ae13218dc5c7323f https://github.com/facebook/react/tree/a41aa76ef36471ba07b29... > You'll notice that we used an XML-like syntax; we call it JSX. JSX is not required to use React, but it makes code more readable, and writing it feels like writing HTML. A simple transform is included with React that allows converting JSX into native JavaScript for browsers to digest. At this point I would kindly ask you to go away.
- BiteCode_dev 2y agoI stand corrected, I'm the one with a distorted memory of the doc.