text stringlengths 0 1.36k |
|---|
**Mikeal Rogers:** \[whispering\] Shadow DOM... You have to whisper it. |
**Rachel White:** It's one of those things, like, if you ask me what the Shadow DOM was, I could make up a lot of stories about what it definitely isn't... The site that I'm looking at right now is from the developers.google.com site about the primaries in getting started with the Shadow DOM, and they're talking about ... |
So with the Shadow DOM, are you even seeing the other components, if I was gonna use DevTools and inspect it just like out of the box? |
**Alex Sexton:** Yeah, DevTools I think allows you to currently inspect Shadow DOM of Web Components, not of native browser components. The whole idea is that you can have a CSS class in there called button; it literally updates all the button tags, and you no longer have to have a super specific CSS class name added t... |
**Rachel White:** Okay, I guess that does make a lot more sense of you're thinking of React... |
**Alex Sexton:** Especially if you're pulling in components from other people. So if so-and-so styled this button and so-and-so styled this clock and whatever, in the React world there's a higher chance for collisions. Even the box model - one relies on the newer box model, and one relies on the... Things like that are... |
**Rachel White:** \[08:06\] Cool, so why is this stuff important to know, for people that don't know what it is? |
**Alex Sexton:** I think it's unfortunately a longer-term vision for the web than it would have been if people didn't make such good userland libraries to do similar things... I think there's this very similar world to where we live in, an alternate universe where React didn't come out and Ember didn't do the component... |
I think Polymer and Web Components get confused a lot. Polymer is kind of like a library on top of Web Components that allows you to do a bunch of extra stuff, like the React and Ember libraries would kind of offer you, including building and fallbacks, and all sorts of fun stuff. But I think if w want to get to a worl... |
**Rachel White:** Cool. |
**Mikeal Rogers:** So you mentioned React and Ember, and a few people do stuff kind of like this, right? |
**Alex Sexton:** Well, it's fundamentally different... |
**Mikeal Rogers:** Yeah, but you can create a class and then you get a constructor that happened when you create these elements, right? Which is great, and you have ways to do that in all these different abstractions, but you didn't have a way to do it natively... Other than the CSS scoping stuff, which is brand new - ... |
**Alex Sexton:** People talk about element-level media queries instead of window-level, and the Shadow DOM can kind of give you an approximation of that, which is nice... |
There are different lifecycle events that don't necessarily occur anywhere else, except for in these components. A lot of the things that are available to you outside now were created for the purpose of Web Components. The template tag was created for the purpose of this, as well as the Shadow DOM is separated from the... |
Some things we already use are a part of that... I don't know. Some of it leaks back into the top level. I need to look it up, but I'm sure there are a few things. |
**Mikeal Rogers:** Yeah, I'm actually some Shadow DOM stuff in a thing that I'm not using Web Components at all for, and it's really useful just for that element-scoped CSS stuff. |
**Alex Sexton:** Yeah. |
**Rachel White:** Yeah... \[laughs\] Are we done talking about Web Components? |
**Mikeal Rogers:** So there was a question in the chat... "Did Google start this?" |
**Alex Sexton:** I think while the Google people were the ones -- this all came out of the Web Manifesto, I believe... That was a large amount of Google people, and I think the core authors of this specification started at Google, but it is not a Google-only thing; it is a specification in the W3C that has passed and i... |
**Mikeal Rogers:** \[12:03\] Right, right. I think you addressed the Polymer thing, where people tend to conflate this with Polymer... And Polymer IS a Google thing, very directly. But this is much larger. |
**Alex Sexton:** I think one of the core problems there specifically was in the beginning no browser implemented Web Components, but you could effectively use them if you used Polymer... So for a while the only way to use Web Components was with Polymer, and I think that history caused this conflation, versus other sim... |
**Mikeal Rogers:** Yeah, that's kind of funny thing though when you think about it, because one of the big benefits that they continue to talk about is that you don't need a bunch of JavaScript in order to do this... Like, you don't need this giant library, that's the benefit, and then people are conflating it with thi... |
**Alex Sexton:** Yeah, I think it is pretty fundamentally different though... The size of Polymer is pretty different than the size of Ember or similar things... But also, you can get initial renders and working things before you have full Polymer execution. You can see the page because it's CSS and HTML, and the JavaS... |
**Mikeal Rogers:** Well, do you think then that -- like, we talked a bit about React and Ember eventually moving their implementations towards using Web Components - do you think that this is going to be something that we just change the way that we build our tools on top of them, or is it actually a new enough model t... |
**Alex Sexton:** I definitely don't think that you could just take the current React and throw Web Components over the top of it, but you could take a very similar... Like React 16 (or whatever we're on) -- no, they have 16; let's call it React 20 - they could theoretically change a bunch of the API, and then be output... |
One of the fundamental things that Web Components adds is the ability to do some of the data binding that some of these libraries do via DOM diffing and re-rendering every time. I think that is actually another interesting reason to use it... Not necessarily like a killer, because a lot of that's very fast and can get ... |
But yeah, I wouldn't expect that React or Ember ends up with a Web Component version, but someone would do the React for Web Components and it's called WeAct or whatever, and that becomes a cool, popular thing. |
**Mikeal Rogers:** Interesting, very interesting. I'm trying to play out in my head how much of the web affects this. Like the way that you use Stripe, for instance, or I was using the Tito embed the other day... You get this JavaScript include, and then you kind of use this custom element, and right now it has to do a... |
**Alex Sexton:** \[15:51\] Yeah, I think there are HTML imports which I don't know if have made it into browsers yet... And there are a few things that make a lot of those things really cool. I have implemented a long time the Stripe.js credit card form as a web component just internally to try it out, and the amount o... |
And the speed at which our component can kind of render and then be attached, versus execute the JavaScript and then be injected is also pretty different. If we know one thing about the performance of checkout pages is that everybody who's ever tested it is like "This matters a lot." So I think it could be a pretty goo... |
The fundamental turn is that things can render and exist prior to JavaScript executing, so the server-side rendering isomorphic stuff changes in the way -- like, you don't necessarily need to do rehydration as much as you can... Just like render things as Web Components and then the JavaScript can run after. |
**Mikeal Rogers:** What is rehydration? You just ran right over that one... |
**Alex Sexton:** Oh, sorry. Rehydration in a server-side render... So the competition to Web Components in the world of frameworks these days is that you can get Node.js to render your entire page, and as long as that is a deterministic output, you can 2HTML it and then serve it as the initial load... So no JavaScript ... |
That's what rehydration is... It says "We can just attach ourselves to a server-side rendered page without re-rendering it", and that is a pretty good -- like, if you need speed, if you're a content website and you need speed and SEO and all that stuff, you should absolutely be doing server-side rendering with rehydrat... |
**Mikeal Rogers:** Well, you just mentioned SEO, which means it's time for a break and we get off this topic... \[laughs\] So we're gonna take a quick break and when we come back we're gonna talk about conferences. |
**Break:** \[19:30\] |
**Mikeal Rogers:** Now we're gonna get into conferences a little bit. JavaScript has an amazing conference scene... There's a million little community conferences out there, it has really exploded in the last few years. We're just gonna talk a little bit about speaking at conferences, and if you're thinking about going... |
**Rachel White:** I would say if someone is looking into wanting to start attending some JavaScript conferences, the best thing that they could do is go to JSConf.com. It's the JSConf family of conferences, and I'm pretty sure what that means is first there was JSConf U.S., and it was started by Chris Williams, and the... |
Now there's like - I'm trying to count really fast - twelve that are JSConf\_WhateverCountryThey'reIn. There's a JSConf\_US -- well, there's not a JSConf\_US anymore for now... There's JSConf\_EU, which Mikeal and I will be going to - I'll be speaking - and there's JSConf\_AU in Australia... There's so many. |
If you listened last week, Juan talked about JSConf\_Columbia... They're everywhere. And there's not just the JSConf namesake ones, there's also RobotsConf, there's JSUnconf, there's Cascadia, there's Empire... There's a lot of other ones that are under that umbrella, and it's usually 2-3 days of just really well-curat... |
There's a lot of really awesome resources, and a lot of these conferences also have diversity sponsorship, so if you are from a marginalized group or underrepresented minority, you can often attend at a severely, severely discounted rate, often sometimes free. |
**Mikeal Rogers:** That was a great breakdown. |
**Rachel White:** Thanks! |
**Mikeal Rogers:** I don't think that we could have done that nearly as well. Alex and I are both people that Chris helped out getting our events off the ground in that JSConf family. For me NodeConf and JSFest, and for Alex TXJS. But yeah, that's a great group of conferences... Even the conferences that aren't "JSConf... |
\[24:00\] There's all kinds of new events popping up all over the place, and you can really see the difference in the content and how people are treated... A lot of the code of conduct stuff that is now pretty STDIN conferences really started with JSConf\_US a while back. Alex, do you have anything to add? |
**Alex Sexton:** Me? This Alex? |
**Mikeal Rogers:** \[laughs\] Yeah. |
**Alex Sexton:** Yeah, sure. I have to talk...? Mikeal and I were both on staff for some of the earlier JSConfs with Chris, and I just wanted to share a story about -- I think it was in Arizona and it was the morning of JSConf, the first morning, and everyone had to come register. We were laying out badges and putting ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.