DEV Community

Discussion on: Real-time Kanban board with Vue.js and Hamoni Sync

Collapse
 
zasuh_ profile image
Žane Suhadolnik

Awesome article!

I've been learning Vue myself and am a little confused by the fact why no one is using separate JS files and just includes everything with tags. Or was that just for the purpose of the tutorial?

Collapse
 
pmbanugo profile image
Peter Mbanugo

I don't think it's everyone. It depends on preference but it seems Vue is more of the opinion of having them in one file.

You can read about it here: vuejs.org/v2/guide/single-file-com...

Collapse
 
pavonz profile image
Andrea Pavoni

I'm using Vue since 2 years now. The single file component is very useful to wrap all the specific things you need for a component in a single place.

Of course you'll surely have a main CSS/JS library/framework/whatever (Bootstrap, Bulma, ...) for the generic things, but when you need some specific piece of CSS to style a component it's a lot better to put it in the single Vue file.

Last but not least, the main editors out there all have at least one plugin to handle single-file Vue components correctly (mainly it's all about syntax highlighting)