About a week ago, I was reading a brilliant blog titled βAnyway, this is why I prefer Vue over Reactβ.
He called Vue a library, to which I commented on otherwise. And it sparked an argument that lasted with βletβs agree to disagreeβ.
Here is what I think
Vue is a framework.
In my opinion, the main distinction between framework and library is who calls who. And callbacks doesnβt count.
Frameworks impose a structure the client must follow in order to make it work. They depend upon the structure you implement to manage the life-cycle of activities. Vue does just that. Let me explain why
When you define a Vue component, you define some methods and objects.
new Vue({
data: () => {
return: {}
},
computed: {},
mounted: () => {
},
watch: {
}
})
If this was java or any other real object-oriented system, you would have been extending some base class or implementing an interface. Annotating your methods or sometimes just following some naming rules(like Vue). Then the framework decides to call what and when.
When you use a library, you will not be implementing any structure or API, youβll be calling the API on the library.
Top comments (0)