Svelte Tutorial for Beginners - svelte:element

preview_player
Показать описание
The next special element, svelte:element

This svelte special element allows you dynamically render different elements. Similar to svelte:component, this allow you to choose which elements to render, and let svelte replace it for you. You can pass any attributes, event listeners, and they will be applied to the new element.

---

📚 Related Resources

🔗 Want to learn more from me? Check out these links:

#svelte #sveltetutorial #sveltebeginner

Thanks for watching 🥰 -- with love, Li Hau
Рекомендации по теме
Комментарии
Автор

Return of the King! Thank you for the video, we missed your explanations :)

rebelmachine
Автор

Welcome back, glad to see and hear you!

dvable
Автор

Welcome back, long time no tuts :D
please do frequent updates :P
(suggestion: if you have the time, tips and tricks beyond the basics would be great)

sherifsalah
Автор

"Bindings don't work": Well, at least bind:textContent and bind:innerHTML work when we also add the contenteditable attribute. I have tested this in the REPL, but links don't work in comments, but I am sure you know what I mean.
Also I noticed that scoped tag styles do not apply to the elements. You have to add the :global modifier. I understand why this is happening, but it's a bit annoying.

ScriptRaccoon
Автор

Ok I know a lot of the video was explaining the difference between an Element and a Component; but I was getting a little confused; can you or someone explain very basically what is the difference between them... when do you use and Component vs when you might use this new Element?? Thank you and great stuff as usual!!

Allformyequine
Автор

I need this when I have a Button component and I want to render an anchor when href is passed

AmxCsifier
Автор

Svelte or Sveltekit, you prefer to use which one for all projects? And why?

cutefunnyanimals
join shbcf.ru