- Notifications
You must be signed in to change notification settings - Fork332
Open
Description
https://github.com/pablohpsilva/vuejs-component-style-guide#why-6
Again, grouping makes the component easier to read (name; extends; props, data and computed; components; watch and methods; lifecycle methods, etc.);
exportdefault{// Do not forget this little guyname:'RangeSlider',// share common functionality with component mixinsmixins:[],// compose new componentsextends:{},// component properties/variablesprops:{bar:{},// Alphabetizedfoo:{},fooBar:{},},// variablesdata(){},computed:{},// when component uses other componentscomponents:{},// methodswatch:{},methods:{},// component Lifecycle hooksbeforeCreate(){},mounted(){},};
I suggestcomponents
be placed afterextends
and beforeprops
,
because it is intensively related to the<template>
on top, and nothing else.
like:https://github.com/vuejs/vue-hackernews-2.0/blob/master/src/views/ItemList.vue
I suffer from scrolling too much, and think it is notrelational(rational).
Any thoughts?
Cheers!
Metadata
Metadata
Assignees
Labels
No labels