Sure, to me a library is something you call, like ReactDOM.render(), React.useState(), etc, and a framework calls the code you create. You create files and modules for a framework in the way that it dictates, and a library doesn't constrict you in any way.
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.
Oh, this is new to me. It's not recommending create-react-app, it wants me to use Next.js or something. Yeah that seems like a bit much. I was even doing a React project recently and went straight to create-react-app, bypassing all this, haha.
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.