Warning: if you accidentally put the button tag *outside* the p tag, you'll get this error: "Component template should contain exactly one root element." I don't understand why you're not allowed to have multiple elements in a template yet, but vue.js makes the rules, not me. If you know why, would love to know. Perhaps it will be revealed later in the tutorial series. Loving this!
Gotta have 1 and only 1 root element for each instance. React and Angular work that way too. Wrap it in a tag and youre good: div p text here /p span span here /p hr etc... /div //hope the formatting dosent barf here...
How do you study up on these before you make these videos? How long did it take to go from discovering Vue to being able to use it fluently? What is your professional and academic experience? These videos are amazing, you should have 10x the number of subscribers, easily. Perhaps if you reached out to other awesome youtube tutorial devs (like funfunfunction) you could collaborate.
So in Vue.js 'ref' is the same as 'name' or 'id' in JavaScript? Can I address to page element in Vue by 'name' or 'id' directly i.e. not using sloppy syntax like this.$refs..id? Thank you
Alessandro Amedei thats what I was thinking. I’ve been using Vue for a year now and just learned about refs. Currently wondering if I’ve been doing it wrong this whole time
Just watched this video too and have been learning Vue these past 2 weeks ... I also learned how to use v-model and hadn't even heard of Refs before this video ... I can see that this video was uploaded mid-2017, so perhaps v-model wasn't a feature back then and Refs was the way you had to do it?
I'm getting an error of-- "Invalid handler for event "click": got undefined" can anyone explain where am i going wrong, i surfed the net for two days and still didn't know what to do.