11 ms·
This is the money quote for me: > Frameworks should lure people into the pit of success, where following the normal rules and using normal techniques is the wi
by burlesona 5y ago
This is the money quote for me:
> Frameworks should lure people into the pit of success, where following the normal rules and using normal techniques is the winning approach.
> I don’t think that React, in this context, really is that pit of success. A naïvely implemented React SPA isn’t stable, or efficient, and it doesn’t naturally scale to significant complexity.
- gr__or 5y agoI would say the popular server-focused frameworks that came before suffered from complementing problems which also did not lead to a pit of success. Namely view code (HTML/CSS/JS) was harder to compose in a scalable fashion, Rails'/Django's template composition feels vastly inferior to proper componentization. Namely limited type checking, globals sharing, ... These things do make it harder to refactor and get rid of unused code, which also has real impact on users. Another biggie was that there is no great gradual path from server-code to client-code, with potentially additional data. Now React SSR does make you work more for the server use case, in that you tend to write code which should also work on the client-side (which might change with React Server Components) but at least you don't have to face lots of decisions when expanding the interactivity of your app. All that said, I also agree with the blog that there is still lots of refinements to be done on the React side of the world, I just view the world we came from as far less rosy.
- dbbk 5y agoReact is famously not a framework though. Next is the relevant example here, which actually does work to address a bunch of the complaint points, including doing full page reloads when you’ve deployed a new version of the app.
- rched 5y agoReact famously claims not to be a framework. Many, myself included, would argue that it is very much a framework in every way that matters.
- frosted-flakes 5y agoWhich ways are those?
- danappelxx 5y agoReact forces you to write code a certain way. jQuery does not force you to write your code a certain way. In my experience, that’s the single biggest difference between a library and a framework.
- hackerfromthefu 5y agoIf only there was just one way to write react code!
- acdha 5y agoYou’re still writing code which is based on React’s view of the world, not standard web APIs. Saying it’s not a framework just means that people are cobbling together their own frameworks using some popular libraries, which gives more flexibility at the cost of the various combinations being less tested and harder for someone else to support. To be clear, this can be a reasonable trade off – but there’s a cost which people often discount until they realize they just spent a week wrestling with abstraction layers.
- jakelazaroff 5y agoThe definition I’ve seen is “you call a library’s code; a framework calls your code.” You don’t decide when to run your components — React does.
- lhorie 5y ago- It "calls you" (i.e. you never explicitly call your React components, React does) - It permeates your codebase (e.g. migration from moment to date-fns is something you can realistically do piecemeal, React to Vue or vice versa not so much) - It enforces a specific architectural paradigm (components) to the exclusion of others (e.g. MVC, MVVM, etc) - Its direct competitors are frameworks (Angular, Vue, Backbone, Aurelia, Mithril...) - it is composed of multiple libraries (react, react-dom) - Experience in it is considered a primary hiring criteria in many shops (which typically isn't the case for libraries)
- paxys 5y agoIt is a pointless generalization. Not every React SPA is the same. Some scale, some don't. Some use server rendering, some don't. React may be a perfect fit for your app, or it may not. It's not like a "naively implemented" app using vanilla JS or server templating or any other framework will be automatically fast and scalable. Quality of input = quality of output, regardless of what abstractions you decide to use in the middle. Every "<technology> is good/bad" article eventually reduces down to an internet flame war ignoring all nuance.
- burlesona 5y agoI thought the original article had a lot of nuance, actually, and did a good job describing where React reasonably fits in the scheme of things. I would argue your statement that “every React app is different” is part of the problem. There are so many react apps that are essentially the same but each one is implemented with some bespoke cocktail of parts because React isn’t really a framework, and it doesn’t solve the “rest of the app.” This isn’t inherently a bad thing, but it contributes to the general confusion and churn that had made front-end engineering significantly harder and less fun - at least in my experience - over the last 5 years or so.
- hackerfromthefu 5y agoYup, and then you try to upgrade them over the years. Oh the joy. Keeps you in a job anyway. Maybe that's the real reason for react fervour!