Тёмный
No video :(

Write Reusable Code with Vue DYNAMIC COMPONENTS 

LearnVue
Подписаться 46 тыс.
Просмотров 31 тыс.
50% 1

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

 

28 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 32   
@astrosoup
@astrosoup 3 года назад
These short videos are incredibly helpful to a learner like myself. Thank you for making them!
@LearnVue
@LearnVue 3 года назад
glad you like them!
@ericjunior105
@ericjunior105 2 года назад
I don't know how to say this but your account is a life saver. Short, precise and useful
@LearnVue
@LearnVue 2 года назад
❤️
@biliyonnet
@biliyonnet 2 года назад
I used it to convert markdown to vue. First I found markdown directives in document and then convert them to vue component like "*italic content*" to "italic content and then I was have a valid vue template string, so created an object with it and gived it to the and then created and feed the dynamic component with that md components like italic and others.
@Revadike
@Revadike 7 месяцев назад
Often components have unique attributes, so then it's usually better to just use v-if
@user-bw3vr6qb7g
@user-bw3vr6qb7g 3 года назад
Hi, can I translate the article from Learnnvue website into Chinese and share it to more developers? I will write the original author and the address of the article.
@gabrielmachado5708
@gabrielmachado5708 2 года назад
You can also pass the component as a variable, and not necessarily need to have the component registered
@mjkodonk
@mjkodonk 2 года назад
Save my day. Thank you
@thomaspotterdotexe
@thomaspotterdotexe Год назад
But what about reusable the component from vue component like the vuetify form input or ant design vue table select input form?
@gurkengerd9981
@gurkengerd9981 Год назад
Isn't that pseudo-dynamic since at implementation time you need to know which types of component can be passed in? I am comming from a Jetpack Compose background and in many components with have a simple content parameter, in which we can pass ANY component we want and it gets rendered flawless.
@_q1b_
@_q1b_ 3 года назад
Can you make a video on render function
@markusandressen2171
@markusandressen2171 3 года назад
Hey LearnVue, thank you for insights. Wanted to ask, could you make a tutorial on how to do SSG (Static site generation) with Vue 3? Tried a few solutions such as vite-ssg and vite-plugin-ssr with no success due to lack of experience.
@LearnVue
@LearnVue 3 года назад
definitely will be looking into this topic for future videos. i recommend checking out vitepress or gridsome in the meantime though!
@augischadiegils.5109
@augischadiegils.5109 2 года назад
thanks
@thomaspotterdotexe
@thomaspotterdotexe 2 года назад
I'm new in Vue and the only problem I have is how to pass data to the targeted components while every components have different props :(
@LearnVue
@LearnVue 2 года назад
Hey there! One solution would be to accept a single object as a prop for each of the dynamic components, and then you can destructure that object on a per-component basis depending on which data it needs. I'd recommend setting up custom validators for that prop though!
@fadlaichsan4924
@fadlaichsan4924 3 года назад
Wow, that's cool! Can you make animate scrolling page with vue js?
@achuagbama2699
@achuagbama2699 2 года назад
I recommend Netninja tutorials on vue animations with Gsap
@nyambe
@nyambe 2 года назад
This did NOT work with script setup, component :is= wanted the component itself, the name alone was not enough. Is that because they are not being exported?
@ColinRichardson
@ColinRichardson 2 года назад
did you do: `import ComponentA from './ComponentA.vue'; or `const ComponentA = import('./ComponentA.vue')` or better yet `const ComponentA = defineDynamicImport(() => import('./ComponentA.vue'));`
@nyambe
@nyambe 2 года назад
@@ColinRichardson I used DynamicImport . I was using script setup. Regular import as shown, did not work as expected.
@ColinRichardson
@ColinRichardson 2 года назад
@@nyambe should work then.. unless you accidently did `import './ComponentA.vue'` Because what you do then, is import the component with no name associated with it.
@nyambe
@nyambe 2 года назад
@@ColinRichardson DynamicImport did work, regular import did not. Not sure why. With script setup, there is some doc on that. Google it
@RobertWildling
@RobertWildling 2 года назад
@@ColinRichardson What about the `comp` variable? How is that one supposed to be initialised I Vue 3? (I think a separate video about DynamicComponents in Vue 3 would be very helpful.) I needed to do this to make it work (but is it the best way?): import { shallowRef, defineAsyncComponent } from 'vue' const ComponentA = defineAsyncComponent(() => import('../components/componentA.vue')); const ComponentB = defineAsyncComponent(() => import('../components/componentB.vue')); const comp = shallowRef(ComponentA)
@habalgarmin
@habalgarmin Год назад
I don`t like dynamic components because it's hard to use it with TypeScript.
@user-bw3vr6qb7g
@user-bw3vr6qb7g 3 года назад
good
@codybass8873
@codybass8873 Месяц назад
👍
@abdianrizkyramadan1535
@abdianrizkyramadan1535 3 года назад
Cool
Далее
Reusable Form Components with Vue 3
14:18
Просмотров 54 тыс.
Vue Slots Simplified
7:25
Просмотров 54 тыс.
Use Vue Teleport to Make Modals and Popups
4:55
Просмотров 31 тыс.
You're Probably Using Nuxt Wrong
5:16
Просмотров 21 тыс.
Dynamic Components in Vue
14:30
Просмотров 7 тыс.
A Better Way To Organize Components In Vue
10:10
Просмотров 20 тыс.
I've been using Redis wrong this whole time...
20:53
Просмотров 354 тыс.