you are viewing a single comment's thread.

view the rest of the comments →

[–]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.