6 ms·
I was amused by this HN comment saying that React is a tax Facebook imposes on startups https://news.ycombinator.com/item?id=12217170 https://news.ycombinator.c
by firasd 10y ago
I was amused by this HN comment saying that React is a tax Facebook imposes on startups https://news.ycombinator.com/item?id=12217170 https://news.ycombinator.com/item?id=12217170
I do think there's a kernel of truth to it--issues raised in this article and framework choice aside, it's good to ask whether your site needs to be an SPA at all. Because if so you are committing to a lot of time and resources spent on the front end.
- enraged_camel 10y agoIt's not React itself that consumes time. On the contrary, React reduces the time it takes to develop UIs. Sometimes drastically. What sucks is everything that surrounds React, or all other SPA frameworks for that matter. For instance, every time I end up having to deal with Webpack et al, I want to put a gun in my mouth and pull the trigger.
- ehnto 10y agoManaging tooling and dependencies is the worst part of modern front end work. I don't see why we have to weave such a complex dependency tree and asset pipeline. Every project does it differently too, so you end up relearning the same tool with a different name and in different configurations. Too bad if the previous developer didn't commit the dependency manager manifests or task runner file too, you can't reverse engineer an asset pipeline if all that's left is CSS and raw JS. If anything goes wrong, you end up chasing issues through half a dozen abstractions you had never heard of. I can't keep all of this plus my actual project requirements in my head. Let me write some darn code already!
- thewhitetulip 10y agoYes, especially the notorious npm which is hell bent on installing the entire Internet when I do npm install. God knows what and why it installs the things it does
- eatonphil 10y agoFacebook's yarn [0] is a drop-in replacement for 'npm install' that significantly improves install times. Really makes me wonder what npm install is doing. [0] https://github.com/yarnpkg/yarn https://github.com/yarnpkg/yarn
- dictum 10y ago> Really makes me wonder what npm install is doing Pattern matching. For every dependency listed in package.json, npm install downloads and tests every JSON payload publicly available on the Internet until it finds one that produces the desired npm package.
- raarts 10y agoI don't think parent was complaining about install times.
- the_duke 10y agoOn the other hand, it saves a lot of time in backend development if all you have there is an API. HTML rendering, form handling, etc take up a lot of time in the backend too. And with the interactivity that is expected now for many pages (forms just as an example), you end up having to duplicate a lot of things on backend end frontend. And you end up using a framework on the backend too, because you really don't want to hand roll all the routing, templating and form handling. You don't. Trust me. As long as you are comfortable with a JS stack (or have specialized devs for that) and have a good way of server side rendering figured out, I don't think an SPA incurs a big overall tax. As an additional plus, there can be a lot more decoupling between frontend and backend work. You can stub out the API and work on the frontend independently in a much cleaner fashion.
- lojack 10y agoI use React all the time and don't currently work on a single SPA. Most of the time they are composable widgets that spit out hidden tags on a form. Even for simple things, React is usually much easier for me to reason about than the old jQuery way of transforming data and then transforming your DOM separately (or even worse, transforming your DOM, which is the same as your data). As a library, its comparable in size to jQuery, which is pretty much ubiquitous these days.