react

React bills itself as a “library for user interface development”. In computer language for programming the terms “library” and “library” are equivalent, so if we trust what they themselves say, the truth is that there is not much room for discussion. However, in practice, React is also used as a central piece in application development, which could amount to a framework.

In order to decide if React is a framework, it is best to go to the meaning of that concept. A framework is a code base for the development of applications, with a certain folder architecture, a class architecture, design patterns. All in all, a framework contains solid guidelines for building and organizing the code of computer projects.

Obviously React is none of that. React is a library that takes care of a very specific part of frontend application development, such as a component model. React allows you to organize your code based on reusable components. Those components have a view, expressed in JSX code, that is capable of reacting to changes in the data handled by those components. Nothing more than that, so up to here it is clear that React is not a framework.

So if it’s so clear, why this discussion? It’s because React is actually what a framework is used for and is often compared to competitors like Angular or Vue.js which are clearly frameworks.

This fact is explained by the fact that React is very commonly combined with other tools and libraries that, among all of them, we could consider a framework. For example, Redux, as a global application state container, React Router for the application routing system, Axios for HTTP communications, etc.

See also  HTML forms

If we consider a whole series of plugins and tools from the React ecosystem, we could accept the denomination of framework. But always keeping distances in mind and knowing that, whatever is said, React itself is really just a library.

Loading Facebook Comments ...
Loading Disqus Comments ...