What is Vue.extend for?

Their guide in the previous Vuejs.org site had a document.

Copied from http://optimizely.github.io/vuejs.org/guide/composition.html which is forked from vuejs/Vuejs.org at version 0.10.6 of Vuejs.

It is important to understand the difference between Vue.extend()
and Vue.component(). Since Vue itself is a constructor,
Vue.extend() is a class inheritance method. Its task is to
create a sub-class of Vue and return the constructor.
Vue.component(), on the other hand, is an asset registration
method
similar to Vue.directive() and Vue.filter(). Its task is
to associate a given constructor with a string ID so Vue.js can pick
it up in templates. When directly passing in options to
Vue.component(), it calls Vue.extend() under the hood.

Vue.js supports two different API paradigms: the class-based,
imperative, Backbone style API, and the markup-based, declarative, Web
Components style API. If you are confused, think about how you can
create an image element with new Image(), or with an <img> tag.
Each is useful in its own right and Vue.js tries to provide both for
maximum flexibility.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)