Hacker News new | past | comments | ask | show | jobs | submit login

The difference, at least for Vue single file template components is that it's 3 separate areas in one file:

    - <template /> (Templated HTML)
    - <script /> (JS OR Typescript)
    - <style /> (CSS OR SASS/etc)
Whereas in old PHP files you could mix it in anywhere and the files were a big mess. Including inline SQL into your view templates which is hardly a good separation of concerns. While a Vue component can be separated into separate files, at least as one it all represents one isolated piece of the interface.

https://flaviocopes.com/vue-single-file-components/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: