8 ms·
All of this would be far more interesting to me if it weren’t based on React. Almost any other technological choice would have been better, from my perspective.
by halostatue 4y ago
All of this would be far more interesting to me if it weren’t based on React. Almost any other technological choice would have been better, from my perspective. I get it, React developers are cheap because people have bought into the React hype.
To me, though, especially with hooks, React creates a bizarrely deep object tree that is impossible to reason about in comparison with pretty much every other tooling that exists.
- bromuro 4y agoReact was first released 9 years ago, more than a “hype”, it is still a great success! (And source of my economic wealth too) - a cheap developer
- halostatue 4y agoI’m glad you like it. Someone has to, I guess. I can’t stand it and find all the promotion on it to be promising far more than it delivers. It’s heavier, slower, less comprehensive, and less comprehensible than either Vue, Svelte, or most Vanilla JS implementations of component-oriented sites that I’ve seen. Every single thing about React bothers me, from hooks to JSX (which is so much worse than meaningful templates), and I’d rather use something that makes me happy.
- Spivak 4y agoAfter using Dominate, Hiccup, Slim, and JSX, CDK, I have no desire for templating HTML (or anything) on the level of strings anymore. It’s so stupidly clunky, doesn’t compose well, is hard to mutate, hard to test, you have to deal with all the weirdness of your templating language, logic is split across your controllers and templates.
- halostatue 4y agoWe’re talking about templates in the context of component libraries. In particular, I’m highlighting the template languages of smaller, more capable component library systems than React — Vue (2 and 3) and Svelte. In both Svelte and Vue (both versions), Single File Components are the standard. Yes, there’s logic in your template, but it’s closely related to the core business logic, and it reads a lot better than embedded logic in JSX droppings. On the rest of it, I’d agree that a lot of the JavaScript-based pure templating languages don’t really work well, but IMO that has more to do with JavaScript than the templating languages. I find EEX (Elixir), ERB (Ruby), and Jinja (Django-ish, plus others), Liquid (Ruby / Shopify), and Text Templates (Go) to all be pretty good for what they do — and most of them are templating languages that can be applied to HTML, but are not HTML "native" templating languages (even though some have HTML "native" variants, e.g., HTML templates for Go).
- selfmodruntime 4y ago> I’m glad you like it. Someone has to, I guess Millions of people and companies do. For mostly one reason: Getting started is incredibly simple. React's surface area is incredibly narrow. Almost anything in it is just JavaScript. Hooks or Classes? Syntax inside JSX? Just normal JavaScript. With hooks, there are basically two that can do 99% of what you want to do. > which is so much worse than meaningful templates Why? There is a zero bullshit approach here. No magic syntax. No "v-for" or two way binding. No receiver patters or context parameters.
- ramesh31 4y ago>There is a zero bullshit approach here. No magic syntax. No "v-for" or two way binding. No receiver patters or context parameters. Amen. I have zero interest in learning Yet Another Template DSL ever again. React won the framework wars because it's just javascript.
- Existenceblinks 4y agoIt's not. Practically everyone is using JSX. And it doesn't run on browsers.
- lucas_codes 4y agoJSX is just sugar for React.createElement(...)
- Existenceblinks 4y agoDoesn't invalidate that it doesn't run on browsers.
- gentleman11 4y ago> Getting started is incredibly simple. Create react app drags in about a million dependencies, and I’ve never met somebody able to make a react app work without it. That’s not “simple” in my book, create-react-app is a tool that so many people are dependent on that it deforms a lot of architectures to avoid having to modify it, using proxies etc
- likecarter 4y agoYou can always reason quite well about React if you follow good conventions. It's a tradeoff of complexity and flexibility.
- halostatue 4y agoBoth Vue and Svelte are both lighter-weight, faster, and have more features than base React while being less complex and more flexible than React. IMO, Vue 3 has made a mistake buying into the whole hooks nonsense, and I find it less usable than Vue 2. On the other hand, Vue 3’s implementation is more comprehensible than React’s.
- qudat 4y ago> while being less complex Idk, I found the svelte reactivity model a little confusing.
- gwillz 4y agoSomething I don't think Vue has ever got right was the incomprehensible stack trace at the sight of any error. Or maybe I'm missing something. After working for a few years in reactive frameworks like Vue and Svelte, I feel I am longing for the simplicity of React now.
- halostatue 4y agoI’ve found React the complex one, especially with reactive context wrapper hooks (or whatever they’re called). I have a high confidence that when I do an "Inspect element" on a Vue or Svelte component, I’m seeing the tree pretty close to how Vue and Svelte see it. In React, there’s at least twenty hidden layers (at least according to the React development tools last time I touched React code; it was horrible).
- gwillz 4y agoYou're not wrong. "Higher order components" might be the phrase you're looking for. I could argue that they're not really very popular any more with the introduction of the hooks API. But even without those there's a lot of transient things in the tree that I can't explain. Vue really got it's act together in many ways from very start. Single file components are super ergonomic. I don't feel React ever nailed that with at least 10x different solutions. That and global state with VueX is so natural compared to, again, 10x different solutions in React. Vue is a delight in many ways. I'm just currently seething over some issues I had with it's reactive state - and that's where I'm really siding with React. I could go on but I know it's a total rant.
- ZephyrBlu 4y agoReact developers are cheap? So much wat.
- alx__ 4y agoIf they had used any other library there would have been a comment like this telling them they're doing it wrong. Same thing any time WordPress does anything notable. Teams make tech decisions based on multiple factors. Sometimes the ones like "bizarrely deep object tree that is impossible to reason about" are found to be less important. Because at the end of the day websites are for the wider public audience, who aren't affected by bike shedding
- 0xy 4y agoI'd quit any job that made me work on a jQuery/vanilla JS labyrinth. React is the best thing to ever happen to frontend development and from my perspective most contrarians on the topic haven't taken the time to learn React and simply immediately dismissed it.
- halostatue 4y agoReact and JSX are, at best, mediocre. I consider it much more like C++: you’re much more likely to blow your foot off with React than with anything else. The codebases are excessively complex, completely magic, and impossible to debug in comparison to pretty much any other comparable framework, including modern Vanilla JS (with or without Web Components). I agree with you about jQuery. It had its place. It’s painful to encounter now, especially since it can screw up any other framework that you want to put into a website.
- 0xy 4y agoMaybe you've worked on the wrong React codebase. It's come a long way from the Redux & class-based monolith structures from early React. The components I work on and write are all narrow in scope, self-contained and completely testable with no crazy side effects + minimal global scope. The easy path on React is small functional components.
- Existenceblinks 4y agoAlso react-dom.min is 15 times larger than solid/preact/lit-html/svelte, is on the bottom of every perf benchmark, and yet we pretend to have engineering mindshare. It feels like new coming kids would just skip engineering school/university just fine for working in this industry. Disappointed.
- louissm_it 4y agoReact is * old * (in the frontend world), stable and very very well known. It is a solid, responsible choice to build your framework on top of React in 2022. You can upgrade a 7 year old React app with very little fuss. Unfortunately, you cannot say the same about Vue or any of the modern libraries. They also have no track record to indicate they will exist 10 years down the line, but I'm pretty sure my React apps will still be fine. That being said, I'm very excited about SolidJS[1] and the other modern libraries that use JSX. [1] https://www.solidjs.com https://www.solidjs.com
- halostatue 4y agoVue is about as old as React, and upgrading a React app from class-based to hook-based is as much, if not more, work than going from Vue 2 to Vue 3 (but I don’t want to do either one). I’m exceedingly unexcited about anything that uses JSX, which is a blight on the landscape.
- rk06 4y agoIt would not work with other tech. It is a multi year project and such require reliable tech more than anything. Any other tech could become a liability in a couple of years