Тёмный

Vue JS 2 Tutorial #16 - Refs 

Net Ninja
Подписаться 1,6 млн
Просмотров 127 тыс.
50% 1

Опубликовано:

 

30 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 41   
@samuelpimenta1942
@samuelpimenta1942 6 лет назад
Thank you so much for keeping this series free! You don't know how it is impacting my life at this moment. Thank you so much!
@MahmoudAhmed-nd1hv
@MahmoudAhmed-nd1hv 6 лет назад
really I can't find the words to describe this tutorial, clear and smooth demonstration well done
@manwithllama
@manwithllama 7 лет назад
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!
@nosajghoul
@nosajghoul 6 лет назад
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...
@izzatullokanoatov370
@izzatullokanoatov370 5 лет назад
Another monster explanation. Thanks dude for hard working. God bless you.
@NetNinja
@NetNinja 5 лет назад
Thanks so much :)
@joaomatos1144
@joaomatos1144 3 года назад
2021: The Net Ninja still 'Killing it' :D
@nosajghoul
@nosajghoul 6 лет назад
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.
@0000Otto0000
@0000Otto0000 7 лет назад
It will be nice to see an example about using refs to update CSS attributes.
@tom2324
@tom2324 6 лет назад
Whos favourite food is pickles. Sometimes you have a craving but favourite? Good videos by the way!
@schroedingerscat7599
@schroedingerscat7599 5 лет назад
(-Deleted. Problem solved. Was my own fault-) And just for the record: Great Tutorials, netninja! Many thanks and kudos!
@TheodoreRavindranath
@TheodoreRavindranath 7 лет назад
Keeping the ref name same as the tag name in this example is a little confusing
@marcus11b
@marcus11b 4 года назад
thaaanks Ninja !
@ea6514
@ea6514 6 лет назад
You are wonderfully teacher bro!
@hyperborean72
@hyperborean72 6 лет назад
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
@alessandroamedei810
@alessandroamedei810 5 лет назад
The first example can be make also using v-model on the text input right?
@JhoseinProductions
@JhoseinProductions 5 лет назад
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
@DonJuanchito
@DonJuanchito 5 лет назад
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?
@JhoseinProductions
@JhoseinProductions 5 лет назад
Juan Carlos Valdes Perhaps. Im hearing from other developers that v-model is used most of the time over refs.
@tonofcurses7334
@tonofcurses7334 3 года назад
v-model can be used only for these [ input, textarea and select ] while refs can be used for all other html elements
@danielgabe8501
@danielgabe8501 6 лет назад
Thankyou very much
@satyateja6956
@satyateja6956 7 лет назад
Hey Shaun, can you clarify why you were using '$' in front of refs ($refs) in this example.
@greencoder7419
@greencoder7419 6 лет назад
It's just a syntax. You can read the vue documents where they have used similar syntax
@chirag_soni_07
@chirag_soni_07 4 года назад
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.
@asishmishra1605
@asishmishra1605 4 года назад
i think you have not defined the method or have mentioned method name incorrectly
@firdaus0325
@firdaus0325 4 года назад
Is that can be done also by using v-bind method?
@user-il9qo4qc4n
@user-il9qo4qc4n 3 года назад
Yes, I'm unsure why you'd want to use $refs over v-bind to get the data from an input.
@emmanuelogbonnaukah8018
@emmanuelogbonnaukah8018 4 года назад
please how do i grab class in vue.js and update DOM
@GamerWho
@GamerWho 2 года назад
These examples work, but aren't they considered Vue anti-paterns?
@andromeda4641
@andromeda4641 6 лет назад
i fookin love you
@dyunior
@dyunior 6 лет назад
love it Dad! lol
@michaelanggriawan8131
@michaelanggriawan8131 6 лет назад
I used arrow function but it can't works, why ?
@zwaartepunt
@zwaartepunt 6 лет назад
Because an arrow function lexically binds the this value. In this case, you were probably targeting the window object.
@surendraojha3258
@surendraojha3258 3 года назад
is this tutorial worth watching in 2021?
@drew21t
@drew21t 3 года назад
yes
@ahsath
@ahsath 7 лет назад
this doesn't work when working with single file components. I am sorry this does work with single file components.
@hyperborean72
@hyperborean72 6 лет назад
Your pace is getting quicker and quicker with each new video :(
@zombiesbyte331
@zombiesbyte331 6 лет назад
"Pickle" Rick!!! wubba lubba dub dub :D
@maulanaluckyyulianto8141
@maulanaluckyyulianto8141 5 лет назад
hey shaun, pls show me your jutsu XD
@MrAtul2011
@MrAtul2011 7 лет назад
sab concept chura liye angular ke vue walo ne
Далее
Vue JS 2 Tutorial #17 - The Vue CLI
8:24
Просмотров 129 тыс.
Vue JS 2 Tutorial #27 - Slots
15:07
Просмотров 118 тыс.
5 JavaScript Concepts You HAVE TO KNOW
9:38
Просмотров 1,4 млн
Vue JS 2 Tutorial #22 - Props
7:31
Просмотров 152 тыс.
Vue JS 2 Tutorial #21 - Nesting Components Examples
13:35
Vue Template Refs Simplified
4:24
Просмотров 12 тыс.
Vue JS 2 Tutorial #18 - Vue Files & The Root Component
9:56
Vue JS 2 Tutorial #24 - Events (child to parent)
7:31
Просмотров 162 тыс.