4 ms·
I just started cobbling together a demo jquery app mess into a vue3 app yesterday, and lemme tell ya, the docs are great, and I even got from 0 to VueX in few h
by lbotos 5y ago
I just started cobbling together a demo jquery app mess into a vue3 app yesterday, and lemme tell ya, the docs are great, and I even got from 0 to VueX in few hours today.
I'm impressed. Great work Vue team. I'm normally hesitant to adopt a new version of a library when learning and expected to get bitten by a few more things but so far seems mature, stable, and well done.
Edit: That said, I'm still personally not in love with the .vue file structure of mixing languages, but I get it.
- verdverm 5y agoYou can put the languages in separate files https://v3.vuejs.org/api/sfc-spec.html#src-imports https://v3.vuejs.org/api/sfc-spec.html#src-imports
- vagrantJin 5y agoI had much the same experience as you some 4 years ago. The exception was that I was heavily into Angular1 so Vue felt completely natural. The one page vue file made a lot of sense to me off the bat, sort of implying that the component is a singular "encapsulated" entity, at least thats my own mental model. Turns out it was completely wrong but it worked.
- mmis1000 5y agoIsn't it basically encapsulated except the <style> ? The style requires you a `scoped` to opt in isolation with element created by other component. Which always make me wonder about why such default is selected.
- manigandham 5y ago.Vue file is just a .HTML file. The <script> and <style> tag default to Javascript and CSS languages in HTML but Vue's compiler allows you to use other languages like Typescript or Sass automatically (assuming you have the dependencies installed). You can also similarly have the code inline between the tags or point to a separate external file with the src="..." attribute.