- completely changes how you write your frontend
- changes the language itself (JS -> JSX with embedded HTML)
- has lots of react-* libs built around it
- comes with a script initializing an app skeleton
I would call that a framework. And it's a very good one.
You can use it for only a part of your UI, and you can implement any parts of your UI that are embedded within react components without react as well. It doesn't lock you into doing things its way in any manner whatsoever, it is literally just a library with functionality that you can utilize wherever relevant in your app.
> completely changes how you write your frontend
JSX is not an integral part of react. It's quite feasible to use react without using JSX, and I have done so in the past in some of my side projects when I wanted to avoid setting up a build system for a while. JSX just compiles down to plain old function calls, and you can use those directly without JSX without any issues.
> (JS -> JSX with embedded HTML)
JSX doesn't really have embedded HTML, it's just syntactic sugar for plain function calls that only somewhat approximates HTML.
> has lots of react-* libs built around it
Which are usually either libs that implement a react component with react or just wrap some non-react library in a way that's slightly easier to use than using the library directly in an app using react, but it's not like that latter is impossible or even difficult.
> comes with a script initializing an app skeleton
Such scripts exist, but they are not integral parts of react and are by no means required to use react. React is just a library, and if you want to, you can use it without doing anything else except including a single .js file with a <script> in your html file, even if the more usual way of including react in your project is a lot more convoluted.
Most including the standard docs would recommend using create-react-app unless you really know what you are doing
https://legacy.reactjs.org/docs/add-react-to-a-website.html#... if this is up to date
React itself is great. Almost everything built on top of it and every word spoken about it on the internet is garbage.
The incessent focus on shit like CRA, NextJS and people shitting themselves over "NIH" is going to kill React in the next decade and we're going to be stuck with something 10x shittier in it's place. Well done team!
Will say that the React Native docs suck because they keep trying to shove Expo down your throat, which simply doesn't work if you're trying to actually build a production app, plus it keeps changing and breaking stuff. Or at least that was the case a few years ago; I haven't even gone there since.
Edit: Seems react.dev is beyond create-react-app and now it's pushing some overkill stuff that feels like corporate lock-in. Yeah that's a concern.
But defining react as a framework or a library isn't easy, the word "React" isn't just one thing. JSX, initializing script, and the app skeleton are all optional to using React, yet React without JSX doesn't exist, everyone does it, like bundling your web app is a must in production nowadays.
React wasn't so much a framework when it started, you could add pieces of react in different parts of your page, to the point people sometimes argued that it was overkill to have the entire page be a react app. It is slowly walking into the framework direction, and the new react.dev docs violently suggest you use a react with a framework. A developer doesn't just "start" using react in these times, they need to understand a lot to create a full project with react.