DEV Community

Discussion on: 7 Reasons Why React is King of JavaScript UI Frameworks

 
kodipe profile image
Konrad Przydział

@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.

Thread Thread
 
brense profile image
Rense Bakker

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.

Thread Thread
 
lalislau profile image
Marcos

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?

Thread Thread
 
brense profile image
Rense Bakker

Well technically anything is possible, but no, generally it's not a practice to include React in an angular project or vise versa etc.