[Vuejs]-Extracting methods and data out to component

0👍

You can register a component by using Vue.component(tagName, options). The 2nd parameter options is an object with different properties like name, template etc

You could also use single-file components with the extension .vue in combination with a build tool like Webpack. The template will be placed with a <template> tag, styles within a <style> tag and the options object within a <script> tag. You can read more about single-file components here.

👤Nora

Leave a comment