DEV Community

Discussion on: Why is React a library and not a (simple) framework?

Collapse
 
cjbrooks12 profile image
Casey Brooks

Another way to look at the difference between a framework and a library is how opinionated it is about your application structure.

A framework will commonly request or mandate that you extend specific classes, or put files in specific locations within the project. In addition, a framework will very often start itself, and your code is somehow started at some unspecified point in the future.

In contrast, a library will rarely mandate where to put your files, though it might require extending certain classes. More likely though, a good library works on interfaces, or else you use it's classes but not create your own. In addition, a library knows it cannot start your application for you, so you usually have to manually initialize it yourself.

I personally have not used React and so cannot say which one sounds more accurate.