New component patterns for Vue 3

preview_player
Показать описание
Andy Li rates and reviews three new component patterns for Vue 3.

0:00 3 component patterns
1:11 Hybrid Syntax
7:36 Functional Syntax
15:35 Script Setup Syntax
Рекомендации по теме
Комментарии
Автор

As I'm refactoring many components to script setup this video is very enlightening on the advantage to use it. A must watch video!

Gepeto
Автор

Well done. Best video by this channel. More videos from Andy Li!

DedicatedManagers
Автор

Thanks for this. I've been using Vue for about 3 years now and have been procrastinating learning the new APIs but it seems much simpler than I expected (thanks to your teaching skills, no doubt) :)

brad
Автор

Hey, @14:48 for defining default prop value we can further simplify by making use of '||' OR operator returning left operand if true or else right operand (default value) for eg:-

count:_props.count || -1;

pranav
Автор

Very well articulated and explained. Thank you!

henkspaaij
Автор

i am curious what software you used to create this video?

tianqing
Автор

18:23 it's so beautiful

*interface* 😍

edu.paixao
Автор

Hi! Thanks great job ❤ Is it possible to use context in setup syntax?

vladshepeluk
Автор

I have a question about defining props using TS annotation. How can we use validator?

VitorNeves
Автор

You can use default values while object destructuring..but setup looks rly promising except the thing that everything will be exposed (exported). That doesn't seem good

fluffyartdev
Автор

Great vid! Really excited about Vue 3 and using script setup with typescript. Unfortunately I can't migrate to Vue 3 until the libraries we use start supporting it, specifically Vuetify. It could be another year before we can upgrade 😢.

jacobhassel
Автор

Wow, didn't know about props with default in typescript

xrk
Автор

There is a risk of vue macro for typescript Will blow it sometime?

heyyy
Автор

I have a question. Does options API gets tree shaked if not used, in the final build if webpacked is used?

magdasmircea
Автор

I'm still love options api. the compsition api may do some things better, so we probably will switch to hybird components, but it's hard to convince me to use setup script.

vevan
Автор

Why template need below in script setup?

alvinindrap
Автор

Finally am explanation on the who old change, this is very 😎

nove
Автор

How do you name a component in script setup?

justafreakable
Автор

Uuuh that was useful, thanks.
I understood I'm using a functional component for a quite complex form rendering component I'm writing, but I was calling it "render function component" 😅 (and I already found out reactive variables don't work because changing them doesn't trigger render function execution, nice to have official confirmation :D)

RobertoMaurizzi
Автор

Функциональные компоненты жижа какая-то

rush-rr