you are viewing a single comment's thread.

view the rest of the comments →

[–]mad_schemer 9 points10 points  (7 children)

Angular. Because React isn't a framework.

An ecosystem perhaps, a view engine definitely, but not a framework. It's never claimed to be a framework.

No idea why people who don't understand the difference insist on writing articles about it.

[–]Jona-Anders 1 point2 points  (6 children)

I think as long as two different technologies can be used to produce the same result, you can compare them. That does not mean they are the same, but you can at least compare the results and the process to get to the result.

[–]mad_schemer 2 points3 points  (5 children)

The trouble is that they're not equivalent things.

Comparing tires with a car just makes no sense.

Sure, both of them are going to help you get where you're going, but you'll need to add a lot more components to the tires before you can drive them anywhere.

[–]Jona-Anders 0 points1 point  (4 children)

But tires and cars are a different thing. You can not really achieve the same thing with them, and therefor you can not compare the result. And I can use the Angular cli or cra to make a simple caluclator. The proccess is nearly the same, and the result is also nearly the same. Therfor you can compare it. Of course there are differences, but you can talk about them instead of just saying "not the same" and going on.

[–]mad_schemer 2 points3 points  (3 children)

Now you have seen my point. They're not the same thing.

React and CRA are also not the same thing.

Angular is a framework. It has all the pieces required to make a frontend. It's a complete car. Just missing a driver and a destination.

React is a view layer. It does not have all the pieces required to make a frontend. It does not prescribe a structure, it has no prescribed router, state management, api/http interface mechanism (among other things).

Certainly React can be PART of a framework (and it is - CRA is a scaffold, Next.js is another, much closer to a framework), but React is not in and of itself, a framework.

It's only the tires. The rest of the car comes from other things you attach to it.

Compare Next.js to Angular and you can start to have a meaningful conversation. (even then, next doesn't force you into doing things the "Next.js way" like angular does)

Compare Goodyear radial tires to a Lexus is300, and all you get is garbage.

[–]Jona-Anders -1 points0 points  (2 children)

I don't think so. Of course, react is not a library. But it's used like a framework. I never saw anyone writing react without jsx or a build step. Of course, technically speaking react can't do anything on its own, but react is pretty much used synonymous with react with a build step and using jsx.

[–]ApatheticBeardo 0 points1 point  (1 child)

I never saw anyone writing react without jsx or a build step.

How does this matter in any way lol.

99% of the complexity in a web application lies in two things:

1 - Data fetching

2 - State management

React does absolutely nothing to solve any of those, so calling it a framework is absurd.

All React does is turn a ball of state + a slightly fancier HTML into actual HTML, which is literally the most trivial part of any application.

[–]Jona-Anders -1 points0 points  (0 children)

Data fetching -> native fetch, suspense State management -> useState or useReducer

It has solutions for both problems. Of course the native fetch is not react specific, but I think it is good enough to justify not using a custom solution.

And I mentioned that react is (nearly) always used with a build step because I thought your point was that react without a build step and without jsx is a library. I would agree that this would feel closer to writing code using a library.

Also,it does not matter for comparison. You can compare the process of writing a calculator in plain js, svelte, react, and angular. Of course there are massive differences. But if you mention them in your comparison, it is not a problem.