React might be great for some. Not to rain on your parade but it's really not a framework, despite what people are claiming it to be. It's a library. Like jquery.
And there are tons of libraries that are of similar functionality. Like vue, svelte, or if you like actual frameworks, angular.
I've recently been charmed by svelte but for work, nothing beats angular for spas
I have actually built UIs with Angular. I even learned Angular before i learned react. Angular is a great framework, and it allows you to build very robust applications. I also like the Angular CLI too.
However apps that I built with Angular ends up being quite large, angular also enforces a strict application structure.
You have to learn TypeScript, if you don't already know how to use it, then you have to learn how to work with Observables, 😥.
Svelte comes close, i like how simple it is to get started with, it has an elegant syntax and a great state management solution which is built in.
Then Again i find myself running back to react, because some libraries I'd like to use doesn't really works out of the box, svelte has a great community but its nowhere near what react has.
Again like I said earlier, in some aspects some frameworks are better, however when it comes to overall performance remains dominant.
Svelte plays very well with JS, this is a oldest arguments users from angular and react often pull from their books. If you really run back to react then you did not research and spend enough time to optimize with just JS.
What you're trying to say, it doesn't fit the angular definition of itself and angular calls itself a framework, so everything else is now not a framework? Thats not how words work :P Angular is a different kind of very opinionated framework. Opinionated frameworks are nice if everyone has the same opinion, which was (more or less) briefly the case when angular was first introduced, because it made 2-way data binding easy. Something which was hard(er) in other frameworks of the time like Backbone.js.
React very much defines a supporting structure around which something can be built. The built-in hooks are part of that structure. For an incomplete reference, take a look here: reactjs.org/docs/react-api.html or look at the typedefs for the React object to see what supporting structure React defines :P
Why are we even having this discussion? The trends are extremely obvious, angular is done. 2021.stateofjs.com/en-US/libraries... angular hasnt been popular even before Russia invaded Crimea :B You might as well try to defend ember.js 😅
IMO it's a (light) framework because you don't have to add anything to write full featured applications et scale. I mention hooks because before them we needed a state management tool like redux.
Furthermore React enforce an opiniated unidirectional flowed component based architecture.
@brense I didn't mentioned Angular and its definition of framework, also I didn't defend any framework at all - just talk about React itself.
From my perspective React was and still is a library which solve exactly one problem - playing with VirtualDOM (and side effects) and translating it to changes in DOM. Of course you can write whole application around React but you can do it also around any other library like e.g. jQuery which solve also one problem.
Any other typicall problems like communication with API, state management, routing are solved not by React but 3rd-party libraries which in many cases just integrate other 3rd-party libraries with React (e.g. Redux).
When it comes to architecture/structure topic, React just reacts on certain side effects and run composed functions if something has been changed to modify VirtualDOM and DOM after all. I don't see here anything about supporting structure.
I'm not sure how API communication and state management or routing translate to "structure" for you... IMHO those are domain specific choices. Some business logic doesnt even need routing or API calls...
React doesnt tell you how you should structure your code, thats not the definition of a framework. A framework IS a supporting structure ontop of which you can build. Which is exactly what React is. A framework that tells you how YOU should structure whatever you're building is opinionated and will ultimately fail because it can't keep up with rapid changes in software development.
It´s possible to mix angular and react in the same front-end project? React and vue, react and svelte? So you can call it a library. If not, react can be called a framework?
React might be great for some. Not to rain on your parade but it's really not a framework, despite what people are claiming it to be. It's a library. Like jquery.
And there are tons of libraries that are of similar functionality. Like vue, svelte, or if you like actual frameworks, angular.
I've recently been charmed by svelte but for work, nothing beats angular for spas
I have actually built UIs with Angular. I even learned Angular before i learned react. Angular is a great framework, and it allows you to build very robust applications. I also like the Angular CLI too.
However apps that I built with Angular ends up being quite large, angular also enforces a strict application structure.
You have to learn TypeScript, if you don't already know how to use it, then you have to learn how to work with Observables, 😥.
Svelte comes close, i like how simple it is to get started with, it has an elegant syntax and a great state management solution which is built in.
Then Again i find myself running back to react, because some libraries I'd like to use doesn't really works out of the box, svelte has a great community but its nowhere near what react has.
Again like I said earlier, in some aspects some frameworks are better, however when it comes to overall performance remains dominant.
Svelte plays very well with JS, this is a oldest arguments users from angular and react often pull from their books. If you really run back to react then you did not research and spend enough time to optimize with just JS.
PS. Svelte is a compiler 😉
Since hooks and context, React can be seen as a framework, not as rigid as angular but still, you don't really need anything else.
Hooks and context have nothing to do with "framework". React is a UI library due to lack of concrete architecture IMO.
Cambridge dictionary: framework
What you're trying to say, it doesn't fit the angular definition of itself and angular calls itself a framework, so everything else is now not a framework? Thats not how words work :P Angular is a different kind of very opinionated framework. Opinionated frameworks are nice if everyone has the same opinion, which was (more or less) briefly the case when angular was first introduced, because it made 2-way data binding easy. Something which was hard(er) in other frameworks of the time like Backbone.js.
React very much defines a supporting structure around which something can be built. The built-in hooks are part of that structure. For an incomplete reference, take a look here: reactjs.org/docs/react-api.html or look at the typedefs for the React object to see what supporting structure React defines :P
Why are we even having this discussion? The trends are extremely obvious, angular is done. 2021.stateofjs.com/en-US/libraries... angular hasnt been popular even before Russia invaded Crimea :B You might as well try to defend ember.js 😅
IMO it's a (light) framework because you don't have to add anything to write full featured applications et scale. I mention hooks because before them we needed a state management tool like redux.
Furthermore React enforce an opiniated unidirectional flowed component based architecture.
@brense I didn't mentioned Angular and its definition of framework, also I didn't defend any framework at all - just talk about React itself.
From my perspective React was and still is a library which solve exactly one problem - playing with VirtualDOM (and side effects) and translating it to changes in DOM. Of course you can write whole application around React but you can do it also around any other library like e.g. jQuery which solve also one problem.
Any other typicall problems like communication with API, state management, routing are solved not by React but 3rd-party libraries which in many cases just integrate other 3rd-party libraries with React (e.g. Redux).
When it comes to architecture/structure topic, React just reacts on certain side effects and run composed functions if something has been changed to modify VirtualDOM and DOM after all. I don't see here anything about supporting structure.
I'm not sure how API communication and state management or routing translate to "structure" for you... IMHO those are domain specific choices. Some business logic doesnt even need routing or API calls...
React doesnt tell you how you should structure your code, thats not the definition of a framework. A framework IS a supporting structure ontop of which you can build. Which is exactly what React is. A framework that tells you how YOU should structure whatever you're building is opinionated and will ultimately fail because it can't keep up with rapid changes in software development.
It´s possible to mix angular and react in the same front-end project? React and vue, react and svelte? So you can call it a library. If not, react can be called a framework?
Well technically anything is possible, but no, generally it's not a practice to include React in an angular project or vise versa etc.
Great comment until you attempted to pass your opinion as fact. The, arguably, big three vue, react and Angular do a fine job.