4 ms·
> 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 surfa
by 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
- csharpminor 4y agoAgree, and re-hydrating projects that have been left sitting for more than a few months invariably leads to dependency mismatch hell.
- cypress66 4y ago> I’ve never met somebody able to make a react app work without it. How so? You just need to call createRoot and you have react working. The reason why people use CRA is that it comes with all the tooling required for modern webdev, such as webpack, babel, eslint, prettier, jest, etc pre-configured for you. Setting up all these tools takes quite a bit of time, but that's not react specific. You would want those same tools for any frontend project regardless of react.
- dragonwriter 4y ago> Create react app drags in about a million dependencies, and I’ve never met somebody able to make a react app work without it. I’ve done react “from scratch” with manual configuration of the build toolchain, without a builder or template app (there's a lot of each around, CRA isn't the only one.) It's not particularly difficult, but there's no payoff (in any real world use case I’ve had so far) for the extra work.
- halostatue 4y ago"Zero bullshit"? "No magic syntax"? JSX is 1,000% magic syntax, and anyone telling you otherwise is trying to sell you something. It looks, feels, and acts wrong in ways that Svelte or Vue templates (and most other templating systems) don’t, to me. And the whole thing about hooks is a punt from the developers of React saying that they couldn’t figure out a more humane way of smartly figuring out reactive dependencies. The whole trick of figuring out why you have an update loop (and specifying those dependencies) is work that the tooling should be able to figure out for me. What use is one-way binding if I have to specify my update dependencies at least twice in every hook (once in the hook logic and once in the dependency list)? And you’re right: React’s surface area is narrow, which does not justify the framework’s bundle size or it’s painful developer semantics. Both Vue2 and Vue3 provide more than React does with bundle sizes that are ⅔ as large. Svelte’s runtime, when needed, is even smaller. What excuse does the React team have for causing so much lost developer productivity and wasting bundle sizes? At least Preact has the excuse that it’s a much smaller runtime bundle. I look at React code and I see cries for help from people stuck in an abusive relationship with their development tools, when there are so many better choices out there. Including plain old vanilla JS (which is increasingly an option from my perspective). That said, I’d much rather deal with React than Flutter and Dart any day. React still ultimately compiles to real components for the platform, whereas Flutter can’t even pretend to be a good citizen of any platform.
- BigJono 4y agoYou have no idea what you're talking about. JSX is a line for line transform. It's literally the simplest implementation of templating that's even possible. The next step is just not having any sort of transform or build time and representing your DOM structure as JS code (which is also an option in React and what a lot of other smaller libraries do). Your entire argument is arguing for React, not against it. It makes no sense that you complain about magic then ask why dependencies need to be passed into hooks. How do you think other libraries avoid that quirk? Magic. Computed properties in Vue are opaque build time magic. Templates are build time magic. React is the only library that doesn't have build time magic that you need to treat as a black box.
- 4y ago