Тёмный

Web Components Crash Course 

Traversy Media
Подписаться 2,3 млн
Просмотров 255 тыс.
50% 1

This is an introductory crash course on web components including custom elements, shadow DOM and HTML templates.
Code:
codepen.io/bra...
💖 Become a Patron: Show support & get perks!
/ traversymedia
Website & Udemy Course Links:
www.traversyme...
Follow Traversy Media:
/ traversymedia
/ traversymedia
/ traversymedia

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

 

13 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 452   
@TraversyMedia
@TraversyMedia 4 года назад
If you want to look at some more in depth examples that are still pretty understandable, check out - github.com/mdn/web-components-examples. I know this is a lot to build some user cards, but the point is to show you how to do it so you can build bigger and better things :)
@ebol08
@ebol08 4 года назад
Awesome! I recommend reading "Please consider not adopting Google WebComponents" available on Hacker News.
@AnkitKumar-fn8xf
@AnkitKumar-fn8xf 4 года назад
Please do a course on web components with story book, Tree shaking bundlers
@justinoneill2837
@justinoneill2837 3 года назад
@@ebol08 ​ Read "Web Components VS Frameworks". It's an article I wrote on Medium a few years back.
@ragnarok7976
@ragnarok7976 3 года назад
You might be interested in StackBlitz. It's basically VScode in the browser. It also has a bunch of pre-built projects templates and a live code viewer built in. Pretty much looks like what you have set up there except you wouldn't need to split Code and a browser or run a local server.
@tommyshaw2420
@tommyshaw2420 3 года назад
@@ebol08 I dont like this, it honestly feels like google is attempting to make the web into their own personal app store...
@budket2513
@budket2513 4 года назад
If you need a video idea then I would suggest debugging code. I haven't seen a tutorial on your channel about it and I don't know how to use VS code debugger.
@cjwebdev
@cjwebdev 4 года назад
@@budket2513 That is a great suggestion. I would love to see that tutorial and it's (Brad "the alien" Traversy)😁 My gorgeous friends. 😁
@RNMERIA
@RNMERIA 4 года назад
that is a very good suggestion
@anthonypetruzzi158
@anthonypetruzzi158 4 года назад
You could do an entire channel dedicated to "deep diving" through visual studio code. It has so many features it's mind blowing.
@BjornBrasse
@BjornBrasse 4 года назад
Great idea, looking forward to that crash course!!
@hj1ax
@hj1ax 4 года назад
I don't really know how to use the debugger of vscode.
@ktb8n737
@ktb8n737 2 года назад
Your tutorials are great! You provide comprehensive explanations of WHY and WHAT which most tutorials skip or skimp. I really appreciate how you don't assume your viewers know certain things - THANK YOU
@corneillealimasi1530
@corneillealimasi1530 4 года назад
it's like I wasted my time watching other web tutorials, but since I came across your Traversy Media channel, I have become fans and addicts, thank you, you do well and clearly explained, we expect more from you.
@dazelmann6589
@dazelmann6589 4 года назад
Geez hold up, why don't you dig out the stuff reading docs and practicing .... And then trying to lay it all off in a video. And then someone comes along and say we expect more from you. Keep up. Give the guy some hold off....
@saulgood2548
@saulgood2548 4 года назад
Brad is making sure we stay sharp during the pandemic! Appreciate it!
@TraversyMedia
@TraversyMedia 4 года назад
Yes, definitely. As much as it sucks, take the time to improve knowledge :)
@matthewtetley7048
@matthewtetley7048 4 года назад
@@TraversyMedia Is this a similar process as to how some parts of Angular and React are written, the displaying of it at least
@Jennifer-ju8de
@Jennifer-ju8de 3 года назад
Can you imagine it’s been year already?
@gerryjtierney
@gerryjtierney 4 года назад
Brad Traversy continually giving his expertise and time to the community. This man is the rising tide that raises all ships.
@Oygen_
@Oygen_ 4 года назад
Nice video. But removeEventlistener() needs to be called on an element with arguments of which event to remove and which function.
@shilangyu
@shilangyu 4 года назад
was looking for such comment. His implementation has a memory leak
@KrzysiuMax3000
@KrzysiuMax3000 4 года назад
true
@googacct
@googacct 4 года назад
I have been a programmer for about 20 years and have been watching your videos for several months.I mostly do java backend development, but use other languages as needed. I was recently tasked with doing my first fullstack javascript project. Your videos have been extremely helpful in allowing me to get up to speed quickly on the latest frontend techniques and increasing my versatility in my day job. Thanks for putting these videos out there.
@RemoteJuniorJobs
@RemoteJuniorJobs 4 года назад
This is one of the most beautiful things I ever see on web development! Awesome crash course as always!
@IsaacAsante17
@IsaacAsante17 4 года назад
Yes, I needed this! Brad, you make everything look easy. Keep up the great videos!
@xzex2609
@xzex2609 3 месяца назад
today I watched a video about web components for the first time and I didn't get any of it. so I look for it in brad's channel. you cannot imagine how declarative and easy you make the stuff that you teach.
@yahayaoyinkansola8258
@yahayaoyinkansola8258 3 года назад
Web components are really awesome, they make you have that component based structure that are in javascript frameworks and makes writing html less painful, instead of having to copy the same piece of code each time, thank you Brad
@justincantley9705
@justincantley9705 2 года назад
If I'm searching for tutorials on a subject I want to learn, and I see that you've got one on it, I will always watch it first. Great job as always on this.
@bankoleesan2129
@bankoleesan2129 4 года назад
I'm so happy right now... I love how you always follow through on things Brad. You said you'd do it, and here it is!!! A video on Web Components (You promised this in your Vue Crash Course 😄). Thanks for being so Awesome Mr Traversy. My Hero and the darling of the global dev community... Stay safe, healthy and blessed always Sir 🙏, you and yours.
@TraversyMedia
@TraversyMedia 4 года назад
Banky K thanks 😊 same to you my friend.
@anmolagarwal5952
@anmolagarwal5952 4 года назад
Your way of explaining things step by step and the art of breaking things in little understandable parts is amazing. It make things a lot easier than they actually are! Thanks❤️
@lewissheridan
@lewissheridan 5 месяцев назад
Brad - I watch a lot of videos on RU-vid pertaining to Web Dev, and there's a lot of content out there, but your content proves to be by far and above the best I've come across. @2.22M subscribers, I think I'm not alone in my views here. I'm grateful you continue delivering these great crash courses!
@hnasr
@hnasr 4 года назад
That is why I like. Vanilla Javascript and components . Thanks Brad!
@saloniyadav7249
@saloniyadav7249 4 года назад
I had gone through a lot of blogs before finally youtubing about it. Nothing beats this tutorial. Now I can go back to those blogs and finally make sense! Thanks man! This is awesome and much appreciated!
@TheNerdyDev
@TheNerdyDev 4 года назад
Brad, you are never short of content. Top notch stuff as always.💥💥
@maskman4821
@maskman4821 4 года назад
Thank you Brad for this very cool web component intro tutorial, I've learned something, now web-api is getting powerful each day, I think in the near future single page application is gonna become part of browser, just like vue, react, angular, so there is no need to learn those fancy frameworks, native browser api is gonna takes care of everything !!!
@diManjenje88
@diManjenje88 2 года назад
That’s a very useful tutorial like always. After watch your video “What Learn Before a JavaScript Framework”, I came here cuz I didn’t knew anything about components, and this video was very helpful. Im doing your course Modern Javascript on udemy and it fills all of JS “gaps” needed to learn Angular (that I need cuz of the work)… Thank you so much Brad, you have been blessing us with very useful content for free. May God bless you back.. ❤️ from 🇦🇴
@brunofilgueiras3518
@brunofilgueiras3518 3 года назад
every time I am starting in a new concept I like to refer to Traversy Media, never disappointed.
@blossombabalola1234
@blossombabalola1234 4 года назад
This is so helpful, thank you. Been using react for my web components until recently when I was asked to use just vanilla js. I was confused, didn't even know that was possible. Brad swoops in to save the day again. Thank you.
@huytrankhac8729
@huytrankhac8729 4 года назад
Always short, clear and comprehensive. Love your courses because those provide maximum knowledge in the minimum time.
@devingray1761
@devingray1761 4 года назад
I desperately needed this. I know react but I got tired of not knowing how to correctly answer "Do you know how React works?" This has definitely opened up my understanding.
@soroushyaghoubi7709
@soroushyaghoubi7709 Год назад
one of the most useful videos on youtube. Very well explained. Thanks!
@TKomoski
@TKomoski 4 года назад
Different never knew this existed, never know when I would use it. Just love following along with your video's and banging out the code.
@billgilmore8063
@billgilmore8063 4 года назад
Quality no BS tutorial... and may I add, by the voice of an angel. I found learning very easy with the chill vibes of this guy. Also this video goes perfectly with some lofi beats
@badral-balushi5911
@badral-balushi5911 5 месяцев назад
Best web component video I have seen till know ! 👏👏
@arturoguillen
@arturoguillen 3 года назад
This is amazing! In case you guys didn't know, RU-vid is made with web components (no react, no vue, etc)
@majidmoradi5952
@majidmoradi5952 3 года назад
reeally?
@arturoguillen
@arturoguillen 3 года назад
@@majidmoradi5952 Yeah! When you use the Firefox Devtools to inspect the DOM you can see custom elements definitions all over the place. I think RU-vid uses Polymer for its custom elements. Some examples of the custom elements used in RU-vid are ytd-app, ytd-page-manager, ytd-comments, ytd-popup-container, yt-page-navigation-progress, etc. You can inspect the DOM yourself to check all of those out
@puspamadak
@puspamadak 3 года назад
This tutorial was great. You have explained everything in so simple and step-by-step way that I got the basic idea and concept.
@kabandaclovis6915
@kabandaclovis6915 4 года назад
I always enjoy watching this channel, Thank u Brad!
@bishalsenhdri7655
@bishalsenhdri7655 4 года назад
BEST Professor of This Planet.
@arnopisspot5115
@arnopisspot5115 4 года назад
Bishal Sen HDRI the net ninja is better but he good too 👍
@pxlmoddigitalartsstudios2300
@pxlmoddigitalartsstudios2300 3 года назад
Finally, for many years of using "John Doe" as a test value. We now know what John Doe looks like 😂😂😂 Kidding aside ... thanks Brad! this excites me to jump to my computer first day in the morning to try this out.
@ephraim-duncan
@ephraim-duncan 4 года назад
I really like this course. Thanks Brad. I'll learn to be like you one day.
@selinovaldes
@selinovaldes 3 года назад
As a Californian, I could listen to Traversy say "dra-wer" all day! 😆 Love your mission and your execution, man. Thanks for all the lessons. 👍
@sanyavanya
@sanyavanya 2 года назад
The "move the line up" key combination sparks joy.
@gojoe36
@gojoe36 4 года назад
Been all day just about doing one of Brads tutorials....FOLKS for the price he sold it for.... I don't know how he stays in business....but I am enjoying the heck out of it for $11.00. I been at it for 3 days and got 1/4 of the way through 1 series, bought 3. The level of teaching versus price is way off...but I do appreciate it for sure....AWESOME JOB Brad. 👍👍🐱‍💻
@BESSA-uq5fs
@BESSA-uq5fs 4 года назад
Every Js-Framework Developer should watch this
@garyclarke8238
@garyclarke8238 4 года назад
Incredible Video - I think web components are the future, they will eventually replace React Vue Angular etc So this a very important topic, they are quite a challenge to teach, because they are so powerful . This is by far the best explanation I have ever seen of web components - in both video or text. So clear so concise, amazing how much ground you cover in less than 30 minutes, custom elements, shadow dom, html templates, slots, styling and interactivity. Well done and Thank You Brad.
@muhammadseyan8361
@muhammadseyan8361 Год назад
This is what they said back in the days. Literally no one uses them anymore lol. Awkward to work with
@devinvalencia7836
@devinvalencia7836 3 года назад
Man I love your stuff, when I go to buy a course its always yours, appreciate your work!
@priyankadey3337
@priyankadey3337 2 года назад
Thanks for this amazing course ! Back in 2014 I was learning jQuery from your tutorials now I am learning web components .. time flies :) Thanks for all the great work!
@TheWandererDoc
@TheWandererDoc 4 года назад
brad the rock n roll programmer
@solarspear27
@solarspear27 4 года назад
Thanks for the advice Brad. You prove time and time I didn't go wrong when I first subscribed to your channel, you add value to my time.
@sachin6689
@sachin6689 4 года назад
Liked before watching. You r best 👌
@zaakhirpouzi283
@zaakhirpouzi283 4 года назад
yea i did, before i saw ur comment.
@rudrapratapsinha8880
@rudrapratapsinha8880 4 года назад
mmm khete chaiaiiiiiiii
@lenglain
@lenglain 4 года назад
I never do this...I always assume that he might fail and put out a complete disaster of a video. Hasn't happene dyet but I remain vigilant.
@pengekcs
@pengekcs 4 года назад
I just looked into web components a few days ago with a packt course, but still insta-liked this one :) -- then watched this and still liked.
@charbelsarkis3567
@charbelsarkis3567 4 года назад
Never knew this was possible. Thank you for this knowledge.
@tahasoft1
@tahasoft1 4 года назад
Great Brad. It will be also great to add another video about using lit-html and LitElement to create web components. I'm using litElement for many months at my work and like it.
@timderks5960
@timderks5960 2 года назад
This is a brilliant tutorial, thanks! If I may give some unsolicited advice though: I wouldn't start with the PowerPoint. It may work well for those that already follow you, and just want to learn classroom style, but I almost skipped your video because of it, since I expected the video to be 100% theory, without any practical information because of the PowerPoint. I was looking for a way to get repeatable elements in HTML, because that's what I need right now in my development, so I need practical examples. I want to see code, so I can type along, and I want to see results, basically exactly like you did starting at the 6 minutes mark. In my personal opinion: I'd attach the PowerPoint (as a PDF) to the description of the video, for those who like that quick reference, and just start with the practical stuff immediately. You can always explain the theory while also showing that it works. I've had a lot of professors bore me to death with hours of theory, which only started making sense when they put it into practice.
@mylesdavies9476
@mylesdavies9476 2 года назад
Really interesting stuff, I've been using Vue for a while now and thought the main building blocks of Vue were pure sorcery, however, after seeing this it's clear to see where it comes from. Cheers 🙂
@jww0007
@jww0007 2 года назад
read the source code
@sovereignlivingsoul
@sovereignlivingsoul Год назад
excellent video Brad, i really like this concept, it is a bit clumpy, but no more so really than any other framework, much like using CSS3 Components to reduce development time, building your own web components can be very useful
@blessdarah1256
@blessdarah1256 4 года назад
Hello Brad... it's like you read my mind! I've been searching for a descent and updated course on web components but I've been meeting outdated trash all over the web. Please do more in-depth web components tutorials. Thank you for your unending suit of tuts
@culturapoliticaycomputador9999
@culturapoliticaycomputador9999 3 года назад
From Honduras thank you teacher Brad.🙏
@Levelupment
@Levelupment 4 года назад
Have literally been looking for tutorials on web components for a couple weeks, not much new content out there. Thanks so much for making this vid
@aldocaamal7740
@aldocaamal7740 4 года назад
Web components are not new, they have been around for some time, but the thing is that were buried by React & Angular when they came out (which use them under the hood). Why you dont see to much content about it? well, the frameworks keep updating and there is not much need to implement web components by yourself
@Levelupment
@Levelupment 4 года назад
@@aldocaamal7740 yes I'm aware they aren't new, but I just learned of their existence recently and all the material based around them is from a year or two ago. I understand they may not have changed much but it's nice to see material that isn't a couple years old, and even then there aren't anywhere near as many videos on web components as there are other technologies.
@aldocaamal7740
@aldocaamal7740 4 года назад
@@Levelupment We often think that content from years ago wont help us, I have been on that place, but it will still allow you to understand how something works, many times older documentation has saved my butt. And also RU-vid Dev channels, most show pretty basic stuff, articles and documents are the best way to learn
@Levelupment
@Levelupment 4 года назад
@@aldocaamal7740 The best way to learn is subjective, while I believe solid documentation is definitely one of the best resources, I personally find value in hearing (or reading) things explained in different ways and from different perspectives. Additionally, this specific technology is one with a vague enough name to make it that much more hassle to track down relevant information.
@aldocaamal7740
@aldocaamal7740 4 года назад
@@Levelupment Yeah I get you; you can call this specific case "custom elements" or "reusable components". Is great to see you are one of the people that really want to dive in more complex architectures, and sadly RU-vid will fall short in most topics, tho I expect to cover them in the future. Really love some great chats like this one, have a good one Nikolas, success for you my friend
@DanielDrummond2k6
@DanielDrummond2k6 4 года назад
I would love to have a course like this in a professional application environment. A real project using this technique
@codezero6023
@codezero6023 4 года назад
You are definitely my go to guy for introduction to new web tech.
@i.j.5513
@i.j.5513 Год назад
A very understandable introduction to a complex topic!
@andresndergaard1712
@andresndergaard1712 2 года назад
I'm about to prep for a front-end interview for a role involving Web Components. I've never worked with it before. I've only heard of it. This video was just f@#king awesome Brad - Thank you! 💪
@SelvaKumar-kq7pz
@SelvaKumar-kq7pz 4 года назад
Worth video tutorial! Watched this video fully without seeking! Using web comp, every developer can create js frameworks!
@michaelantoni8274
@michaelantoni8274 4 года назад
Wow just before I sleep new notification on my youtube.. Nice one Brad
@davidluhr
@davidluhr 4 года назад
Really great overview! It should be noted that extending existing HTML elements unfortunately isn't supported by Safari at this time 😠 It's too bad, because this would be super useful for extending native semantics and functionality for semantics, while also reducing the nested internal markup. That being said, custom elements still have a lot of value!
@CodeDreamer68
@CodeDreamer68 2 года назад
Thanks for putting this together. Great primer.
@salemexpress3014
@salemexpress3014 4 года назад
Deserved 1M likes
@mcvgs1780
@mcvgs1780 4 года назад
Web components is on my list of things learn and lo and behold your video popped up. Thanks brad
@starkxz
@starkxz 4 года назад
I really need this crash course. Liked before watching. Thanks Brad.
@mosesnandi
@mosesnandi 2 года назад
Brad's intro is sick! I wonder where the inspiration came from.
@lronSausage
@lronSausage 4 года назад
Why do we need to use templates? Even when you use shadow root, you can still use shadowRoot.innerHTML = `...` and it will work as intended, when the benefits of using string template to have dynamic content.
@aram5642
@aram5642 2 года назад
Would you consider making a video on lit-element (Vite starter, lit-ts) that would also cover the publishing and build stage? Thank you!
@GorillaDevFB
@GorillaDevFB 4 года назад
We use Polymer at my company currently. With LitElement/ lit-html improvements, we'll basically be on native components before too long.
@JanithWidarshana
@JanithWidarshana 3 года назад
Thank you very much :) When running the code I had a issue with giving null values to this.getAttribute('name') always. I could fixed it to moving following two code lines inside of the connectedCallback() method. this.shadowRoot.querySelector('h3').innerText = this.getAttribute('name'); this.shadowRoot.querySelector('img').src = this.getAttribute('avatar');
@russellboswell4882
@russellboswell4882 3 года назад
Thanks man, That came in clutch
@stineandthebooks
@stineandthebooks 2 года назад
Thank you so much for this video! I'm studying for exams at the moment and this really saved me!! :D
@lucasmenicucci8102
@lucasmenicucci8102 4 года назад
Very cool! What about litElements? Is there any advantage of using them instead?
@hezekiahvaldez2943
@hezekiahvaldez2943 4 года назад
you're the BEST FRONTEND GURU!!!! thank you very much sir Brad!
4 года назад
Great crash course Brad, I had no idea this was possible!
@ManontheBroadcast
@ManontheBroadcast 4 года назад
Hi Brad ...how did we removed the EventListener without passing the event type and the callback name (which actually is an anonymous function)??? ...... Thanks ...
@puspamadak
@puspamadak 3 года назад
That's what I am also wondering about.
@mouadtaoussi42
@mouadtaoussi42 4 года назад
Hello Brad Traversy ! Thank you for your stunning content. extremely helpfull
@jrespuny2427
@jrespuny2427 2 года назад
Thank you very much for this excellent educational content making the difficult easy
@ougininja8412
@ougininja8412 Год назад
Amazing tutorial, clear explanation
@davidconnelly
@davidconnelly 4 года назад
Outstanding tutorial. I had no clue about any of that. Thank you! May I ask, is this topic covered in your recent javascript course?
@TraversyMedia
@TraversyMedia 4 года назад
David Connelly hey David, thanks...good to see you. No its not but I plan on adding more projects soon and there will be a web components one 😊
@davidconnelly
@davidconnelly 4 года назад
@@TraversyMedia That's awesome but please do not feel pressure to add it. I'll probably do the course, when I have time anyway. I really like the look of the countdown thing and the speech thing too. So, I'm sure it's a good course as is. Cheers!
@paeon21
@paeon21 3 года назад
In this example, what is the reason for needing to remove the toggle-info eventListener with the disconnectedCallback function? I'm trying to understand web components from the perspective of vanilla javascript, but I'm getting stuck on the overall purpose of lifecycle methods. Are they simply necessary to define the start and end of web component code in a javascript file, similar to how html elements all need a starting and an ending tag? And many thanks, Brad, for all of your helpful tutorials!
@attainconsult
@attainconsult 4 года назад
excellent starter on Web Components
@m12652
@m12652 4 года назад
Is it necessary to include the styling and all the code within the component? Wouldn’t a complex component get a bit heavy on resources if there were multiple instances? Cheers....
@aleksandrsavvopulo4510
@aleksandrsavvopulo4510 2 года назад
I see a problem with template creation. It feels like template element should be defined inside the class. In SPA provided custom element will pollute DOM even if that element is not going to be rendered. Another thing I see, is that "this.attachShadow" already returns reference to the shadow root and you don't need to attach it separately. Information taken from MDN.
@noelpastrana5100
@noelpastrana5100 2 года назад
I love you maaannn... you just made everything easy for me :)
@godfathermikal
@godfathermikal 3 года назад
Great intro! Just needed a quick overview and this was perfect! Thank you.
@mario1ua
@mario1ua Год назад
This makes perfect sense, thank you!
@MoneylessWorld
@MoneylessWorld 4 года назад
Are web compenents a solid choice for the future? Which criticism would you have (styles in JS maybe)? Are there other workflows that trump WCs? Awesome tutorial on the topic regardless.
@nickwust5095
@nickwust5095 Год назад
Extremely useful👍 But in my case I have 4 different sections only with identical title and description. Other content of my sections is different. How should I create my template for these sections? Thank you in advance🙂
@covid20pro86
@covid20pro86 4 года назад
i was looking for this. i want to create a single page portfolio web with reusable components web but without Vue js. keep up the good work
@MrSidMan
@MrSidMan 4 года назад
Another great tutorial that clears the clouds... Thanks Brad!
@hasanirogers7591
@hasanirogers7591 4 года назад
LitElement makes this way easier. It's also declarative. You should do a video on it.
@longingbydesign
@longingbydesign 3 года назад
If you need this to be easier, you probably better stick to a framework in the first place.
@blossombabalola1234
@blossombabalola1234 4 года назад
I have a question though. Styling the elements by the class name from external style css doesn't work.
@russellabraham9208
@russellabraham9208 4 года назад
Thanks for the video. Using template a lot lately with regex, replace, and DocumentFragment, never tried shadow DOM. Cool.
@education24carat
@education24carat 4 года назад
Brilliant Brother It was nice and Very much Helping. Thank You Very Much
@unnhao
@unnhao 4 года назад
very easy to understand! useful for me.
@realjackofall
@realjackofall 3 года назад
Excellent introduction! Just what I needed. Thanks for making this video.
@Traintec
@Traintec 4 года назад
Thanks Brad.
@musedoom
@musedoom 2 года назад
Great introduction to Web Components.
@ragnarok7976
@ragnarok7976 3 года назад
Some answers I found to questions I had: Most answers are from this resource: developers.google.com/web/fundamentals/web-components Really recommend reading that through if you are stuck on something. 1) Why create a template in the document then copy that to the shadow root? > Template is a special HTML element that will not render even if you explicitly type the tag out in your HTML. It also comes with some behind the scenes goodies that makes copying elements from a template more performant. Long story short, it might look a little ugly but this will be faster/more efficient. 2) How are you supposed set styles for the actual custom component not just the stuff inside it? There are no CSS parent selectors! > Well the quick and dirty answer is the class you created is the element so: this.style. = ""; will work! > The downside to this is that in the inspector your element with, lets say a set display to block rule, will look like this: > Oof that's really ugly and isn't really in keeping with the encapsulation of components we are going for! Not to mention overriding those styles later will be a nightmare! > *The Best Answer:* Use the ":host" selector in your elements template CSS like this-> :host{display:block;} > You can still see styles listed in the inspector but they won't be in-lined on the element which will make overriding them from your pages main style much easier! I will update if I come across more!
@stevenschaner6818
@stevenschaner6818 4 года назад
I loved this video. It's similar to things I was learning in Angular. During the video you used css. Can we use sass instead of css for the web component styling?
@thomasfrancis6110
@thomasfrancis6110 2 года назад
Great Content Brad, love it !!
Далее
Easy Frontend JS Workflow With No Framework
22:26
Просмотров 102 тыс.
Learn Web Components In 25 Minutes
24:21
Просмотров 199 тыс.
Standoff 2 is a true horror! #standoff #horror #meme
00:13
Intro to Web Components - Full Walkthrough
33:31
Просмотров 24 тыс.
100+ Web Development Things you Should Know
13:18
Просмотров 1,5 млн
The Programming Language Guide
24:25
Просмотров 475 тыс.
You don't need a frontend framework
15:45
Просмотров 122 тыс.
15 Myths & Misconceptions In Web Developement
16:51
Просмотров 21 тыс.