React Js is a library or framework ?

Hi,
There are many discussions which are going around the web regarding the question "React Js is a framework or Library?"
React Js is a library.
Today I'm going to clear the air and provide you an explanation of why is react js known to be a library.
library vs framework
A library is a set of functions to perform a specific , well-defined task.
A framework is a collection of patterns and libraries to help you build a complete application.





Why is React Js a library?

A Framework provides an entire package of functions and also the structure to build an end-to-end application.It doesn't make you to rely on any other dependencies except the dependencies provided by the framework itself.
The idea of react js is to  divide the parts of a webpage such as header, footer, content, side-bar into components.These components are just the simple functions and can be reused anywhere to improve your code.
React is only concerned about its components which is the view in "MVC" and doesn't really care about anything else in the application.A user is free to develop the application as desired using React Js. This is possible because React provides  no rules and recommendations to develop an application.

Now, We need to understand that ,recommendations and rules are provided by a framework and not a library.A framework tries to control every aspect of your application where a library doesn't. Frameworks help us to build an end-to-end application but react js is just the view.
Angular Js is considered to be a framework as angular gives you functions of data , view and the model.
Everything is well framed in a framework and then given for the developer to use them.
React js is not bound to few rules and regulations , there are many ways in  which a react application can be developed but angular we need to follow a MV* pattern (MODEL, VIEW, whatever).
Finally , React is a Library and not a framework.

On giving this difference , do not doubt the capabilities of react.An application done in angular can be done with react Js too.
We need to import some extra packages in order to make things work in react.Everything is not added in the core React js as the main aim of react is to provide a library to build user interfaces and not an end-to-end application.
An end-to-end application can still be built with react but by exporting some extra packages.

I hope the article has made clear that "Why React is a library a not a framework".






Share this

Related Posts

Previous
Next Post »