chantastic.fm

12: Coming to React with Sara Vieira

Episode 12 · June 5, 2018 · 00:55:28

Hosted by Michael Jackson and chantastic · With Sara Vieira

Download MP3 · Jump to transcript

Sara Vieira is easily one of the most entertaining people we've ever had on this show. She has been working with React over the past few years and has recently been traveling around Europe and giving free workshops on React in London and at React Finland.

Featuring

Links

Transcript

[00:00:06] Michael Jackson: This episode of the React Podcast is brought to you by ReactTraining.com. In-person, hands-on training for development teams from React community leaders and experts. Visit ReactTraining.com to learn more. Hello, everybody, and welcome back to another exciting episode of the React Podcast. I am your I'm your host Michael Jackson, and I'm here with my co-host Michael Chan.

[00:00:36] Michael Chan: How's it going everybody?

[00:00:38] Michael Jackson: And we have a very special guest for you today, Miss Sara Vieira.

[00:00:43] Sara Vieira: Hello everyone.

[00:00:44] Michael Jackson: Sarah is joining us from Portugal.

[00:00:47] Sara Vieira: Yes.

[00:00:48] Michael Jackson: Whereabouts in Portugal?

[00:00:49] Sara Vieira: Uh, I live in a very small town near Porto. I've actually usually joke about this in conferences that my town has less people than the Apollo Slack.

[00:01:03] Michael Jackson: So that puts you- that puts you in what? I mean, Apollo Slack has probably got a couple thousand, so yeah.

[00:01:09] Sara Vieira: We have 5K people, about that.

[00:01:11] Michael Jackson: Oh, really?

[00:01:12] Sara Vieira: Yeah. Wow. Slack has about 6, I think, 6,000.

[00:01:16] Michael Jackson: Wow, that's awesome. Like, is it-

[00:01:19] Sara Vieira: We have one ATM. Yeah, it's cool.

[00:01:21] Michael Jackson: Is- do you have any- do you have any, uh, traffic lights?

[00:01:24] Sara Vieira: No, and the nearest roundabout is in like 3 kilometers, I think. Wow, that's amazing. The nearest traffic light is in like 5.

[00:01:30] Michael Jackson: So the nearest like real intersection is 3 kilometers away. Beyond that, everybody just sort of sort of like waves and says, okay, you go first, not me. Or there's probably not enough traffic to really warrant a uh an interaction at an intersection, right?

[00:01:45] Sara Vieira: No, I don't think there's- yeah, no, there's not enough traffic. But uh the the downside of this is I live right next to the highway, so if you hear cars, it's Oh,

[00:01:57] Michael Jackson: okay. Yeah, no worries. We'll just we'll just edit that out. Well, welcome to the podcast, Sarah. Thank you so much for agreeing graciously to be our guest. I have to be honest, I've been looking forward to this episode for quite some time now. I think we scheduled uh we scheduled this one about a month ago. Yeah. You and I ended up chatting about like crappy movies or something for the next like 20 minutes after we-

[00:02:20] Sara Vieira: I was keeping- obligating people, forcing people to watch really, really bad movies.

[00:02:25] Michael Jackson: So, so, so tell us, have you seen any really bad movies uh recently?

[00:02:29] Sara Vieira: Yes, let me think about the name. Oh, I've watched Tremors 2, which was a um um an experience. Oh, and I I've watched uh Truth or Dare, which is just bad.

[00:02:41] Michael Jackson: Truth or Dare, huh?

[00:02:43] Michael Chan: Is this new?

[00:02:43] Sara Vieira: Yeah, this is actually new. Yeah, so it's about these kids Like, there's always this movie about a curse, and it's usually fun because it's like a fun curse. I don't know what this means, but like it warrants some funness in the movie. But this one is just like- so there's a bunch of kids, they're playing truth or dare, and then they get stuck in this curse. And then every time someone says truth or dare, they have to either answer correctly or do the dare, otherwise they die. And it's like, who came up with this? What year is this? And how old am I? Sounds kind of like-

[00:03:19] Michael Jackson: It's like a really bad version of Jumanji.

[00:03:21] Sara Vieira: Oh yeah. Yeah, exactly. Like Jumanji, like it warns a good curse, like it's fun to watch. And this one is just like kids playing truth or dare. You're like, who's the last guy you slept with? Like, oh my God, I can't tell you. And she dies.

[00:03:34] Michael Jackson: She dies.

[00:03:34] Sara Vieira: That's the movie.

[00:03:35] Michael Chan: What a thing to die over.

[00:03:38] Sara Vieira: I didn't watch it till the end. I couldn't do it.

[00:03:40] Michael Jackson: All you had to tell was the truth. That's all you had to do was tell us the truth. So Sarah has been, uh sorry, back on topic, back on topic, everybody. So Sarah has been uh conducting some awesome React workshops. You might have seen her give her React testing workshop in London or at React Finland, if you were there a couple of months ago. What was that, maybe March? You were doing that? Yeah. April time? Yeah. So, uh, so Sarah's been doing some, uh, some React workshops, uh, across, uh, Europe. Uh, tell us, uh, tell us a little bit about, about what you do for, uh, you know, for, from, from day to day, Sarah. What, what does your, uh, what is your current role?

[00:04:18] Sara Vieira: Right now, uh, I got a, like, uh, my company I used to work for, I used to be like a full stack developer. Now I currently got switched to being more of, um, developer relationships, relations.

[00:04:32] Michael Jackson: Got it.

[00:04:32] Sara Vieira: Uh, and, uh, so right now I am mostly doing conferences or doing some projects like the, the, the Make Frontend Shit Again was not a project by the company. I was just Very bored at a Reason- at a Reason hackathon because I couldn't install Reason on my computer.

[00:04:50] Michael Jackson: So you're like, I'm just gonna make something else.

[00:04:53] Sara Vieira: Yeah, I'm just gonna make something else. That was literally it.

[00:04:56] Michael Chan: Did you still win though? I mean, I feel like you should have won even though it wasn't Reason.

[00:05:00] Sara Vieira: There wasn't a prize, so I didn't even compete.

[00:05:02] Michael Jackson: Oh man.

[00:05:04] Sara Vieira: It wasn't a prize. Yeah, that was very sad. I was like, that's not a hackathon, man.

[00:05:08] Michael Jackson: That's just like-

[00:05:09] Sara Vieira: you have to fight for something.

[00:05:10] Michael Jackson: That's just like forced labor. You know, like, hopefully these developers will come up with something cool and then we can steal it. So cool. So, so you're working on- you said you're working on a lot of backend stuff these days, or is it totally full stack, a lot of frontend stuff as well?

[00:05:24] Sara Vieira: No, it's mostly frontend stuff. Okay. So the last project that I was in also included doing like a GraphQL server to communicate with some weird SDK. Nice. It was really an API, but people- I don't think people know what SDK means. And um uh but mostly I just do frontend. Got it, okay. I do do like building APIs and stuff, but it's mostly frontend.

[00:05:45] Michael Jackson: Got it, got it. Okay, yeah, you had mentioned in in when we chatted that you're doing uh that you were doing some stuff with GraphQL. So I was thinking, oh, maybe she's doing some stuff on the backend too. Okay, cool. So so what kinds of things then uh have you been building with React? For example, this API that you built, what was that uh what was that all about?

[00:06:02] Sara Vieira: Oh, so it's actually fine because the project is open source. So it was uh the last project that I was in actually working as a like full stack developer at the company. We were working for Joyent, the cloud computing thing that made Node thing and all that stuff. I wasn't really coding back then, I didn't know who they were. But yeah, uh and uh so uh they— uh what they did was wanted to like do their new portal, and so we made this uh GraphQL server that communicated with their API instead of dealing with their API.

[00:06:32] Michael Jackson: Okay.

[00:06:33] Sara Vieira: So in order to just get some stuff. And, um, yeah, and all the frontend was GraphQL and all the state management at the end was also GraphQL. It was just like GQL all the things. Everything was GQL.

[00:06:45] Michael Jackson: Interesting.

[00:06:46] Sara Vieira: And everything was styled components as well. It was a- it was a really cool project. I think it still is.

[00:06:53] Michael Jackson: I take it you were using uh Apollo, 'cause just 'cause you mentioned the Apollo Slack earlier. Were you using uh the Apollo for all the state management and stuff on the frontend?

[00:07:02] Sara Vieira: Uh, yeah, at the beginning we were using Redux, then we changed to uh Apollo, and I've actually never used Relay in my life. I have no idea if it's actually better, worse, just different, interesting. No idea. I've only used Apollo. Uh, so I have actually haven't- I've had problems with Apollo, but that's mainly because I'm- we know, we're not very- we think we're very smart as developers, but we're not.

[00:07:26] Michael Chan: We aren't. So sad.

[00:07:27] Sara Vieira: We're not.

[00:07:28] Michael Jackson: Oh my gosh.

[00:07:29] Sara Vieira: Oh my God, I had such a battle in the last 2 days to get server-side React to work.

[00:07:33] Michael Jackson: Oof.

[00:07:34] Sara Vieira: It's just a- it's just a- it's a- it's- it's a pain. If you- if you scroll through my commits, it's the funniest thing ever.

[00:07:40] Michael Jackson: Maybe this will work. No. Maybe this- maybe this time. No.

[00:07:45] Sara Vieira: No, there's one like, try again. And then there's- I think the best one was actually posted on Twitter, which if I- and it's basically like, work in progress, move to SSR, and there's 24 commits. Ooh. There's one that says like, "Push through, girl, you can do this." Oh, and there- oh wait, "Fix local storage." And then there's like, "Move Apollo, fix local storage." There's one that just says "Holy fuck" in capital letters. "I have no idea what I did in here." And then it was like, "Add helmet, react helmet." And then it's like, "Apollo is being a bitch." And then the next one is like, 10 minutes later, he's like, so Apollo is not dumb, I am.

[00:08:25] Michael Jackson: Oh

[00:08:28] Sara Vieira: yeah,

[00:08:29] Michael Jackson: that's-

[00:08:30] Michael Chan: it's like a real-time commentary, uh, on your own, uh, your own work.

[00:08:34] Sara Vieira: Yeah, there's also- there's like the push through, and the next one is like so close.

[00:08:38] Michael Jackson: Isn't that- isn't that kind of like typical though of like the, the software development cycle? I mean, there's like- there's like the initial sort of joy of like I am going to create something new here. This will be fun. Oh, hey, I get to use some shiny new tech. That looks cool. Install, try to use it. You get some sort of initial results, right, that are encouraging. You're like, oh, that's that's kind of neat. Hmm. You run into like a a problem and then you like hop into the chat room and and you kind of ask around a few people. Um maybe somebody makes like, you know, some comment and you're like, uh, you know, he kind of he kind of confuses you. Fast forward a couple hours later, you're kind of like swearing at your computer. You're like, you're like, "I just need some time to think." Maybe like somebody who you love very much comes into the room and you start yelling at them because you're like just blowing some steam. And then- and then all of a sudden it's like, "Oh, I found out uh I was missing a comma on the on line 10 and everything works." Yeah,

[00:09:41] Michael Chan: and then you feel like the smartest- you totally swing the other way and you feel like the smartest person who ever lived.

[00:09:46] Sara Vieira: Exactly.

[00:09:47] Michael Jackson: And then you apologize to that person who you offended. Oh, I'm so sorry. It was just a comma that was missing on line 10. Everything's good now. We're friends again.

[00:09:54] Sara Vieira: I'm sorry, Apollo.

[00:09:55] Michael Chan: So, so Sarah, you mentioned that you you weren't programming back um in the kind of Joyent, Node early days. Um what is your what is your history with uh with with programming? How did you get into it? Kind of what were some of your first technologies and how did you end up come into React, GraphQL, all of those things?

[00:10:16] Sara Vieira: How did I become cool in tech?

[00:10:19] Michael Chan: How did you become cool in technology?

[00:10:21] Sara Vieira: Thanks. I was I was totally fishing for compliments, but it totally worked. Um, so I started work- I I went to college. You can't see me, but I'm quoting because there's just like this weird-ass thing. It doesn't really count as college. It doesn't matter. And then I got a job in an agency, so I was doing PHP and WordPress. So like every good frontend developer, I started with WordPress. And I'm just gonna check when that was. That was in uh 2014.

[00:10:46] Michael Chan: Okay.

[00:10:47] Sara Vieira: Apparently. Uh then I started working more on the frontend, which basically jQuery and stuff. And back when Angular 1 was cool, I changed projects. I'm like, I'm gonna learn Angular. Angular is dope. And then I cried. And um-

[00:11:02] Michael Chan: So so I'm curious. So I had I had kind of a similar trajectory. So I'm curious like at what point in your Angular journey did you start start realizing that this was this was sad for you?

[00:11:13] Sara Vieira: I think I think the most horrible thing was like I was in this project and the part that we that that I was assigned to was uh payments and registration. Registration, it was like the only the good thing that Angular had supposedly was the forms. We had so many timeouts.

[00:11:33] Michael Chan: Oh.

[00:11:33] Sara Vieira: So many timeouts because because of this is the digesting of the scope. Yeah. I remember that I once did a PR, which had a timeout of 13 milliseconds. And the other person in my team was just like, why 13? And I was like, that's the first one that worked. And she was like, okay. And she merged it.

[00:11:51] Michael Jackson: That's a magic number.

[00:11:52] Sara Vieira: And that was it.

[00:11:53] Michael Chan: Oh gosh.

[00:11:55] Sara Vieira: The first file, I don't actually remember the name, but the file that we had to do to start everything that had to import all the things and then start them. Like this model is this model, like the name. Oh yeah, yeah. I don't remember. Yeah. The huge file. Cause we are also using RequireJS. So it was like a huge RequireJS file and it had so many comments of stuff like, I know this sounds dumb, but please don't touch it. And I just remember one comment that I never forgot was this guy was like, init data equals data. And then on top it was like just a comment saying, sorry, that was it. It was broken. We broke him.

[00:12:33] Michael Chan: Isn't it kind of amazing though, how, like how far things have come in like just 6- I mean, no, that was what, 2014? That was. Only like 4, 4 and a half years ago.

[00:12:42] Michael Jackson: 4 years ago.

[00:12:42] Sara Vieira: Yeah, I started- yeah, yeah, I, I started Angular in about 2016.

[00:12:48] Michael Chan: Oh man, it's so crazy.

[00:12:49] Sara Vieira: Yeah, yeah, I have my LinkedIn open, otherwise I don't remember this kind of stuff.

[00:12:54] Michael Jackson: You know, you know, it's interesting, uh, uh, I saw a tweet earlier today from the React account, uh, from the React Twitter account, and they said their Twitter is 5 years old today.

[00:13:06] Michael Chan: So crazy.

[00:13:07] Michael Jackson: Today is the 5-year anniversary of when Twitter was- or sorry, when React was introduced to the world. And uh and I saw a tweet from my friend Ryan Florence who said, he said, you know, I was about to- I was so bummed out on development around 2015 that I was literally about to- or sorry, no, it was uh earlier than that, 2013. He said, I was so bummed out at that time that I was gonna quit. I was gonna quit development and I was gonna do something else. And I I echoed that sentiment. I was like, Ryan, 'Cause Ryan and I uh uh have have done a lot of uh have done a lot of work together with React. And I said, you know, I I felt the exact same way. I I seriously felt in 2013, 2014-ish, I I had recently tried uh uh uh doing a project with with another framework. It wasn't Angular. And I want to avoid mentioning it here so to avoid starting a flame war, but but uh— It was Ember. No, hey, shh.

[00:14:02] Sara Vieira: There were no other frameworks. It was either Ember-

[00:14:04] Michael Chan: What else was it, Michael? Come on.

[00:14:06] Sara Vieira: It was Ember.

[00:14:07] Michael Jackson: I just, I was, I was, I was unsuccessful with it.

[00:14:11] Michael Chan: TanJS? Was it TanJS? Come on, we know it's Ember.

[00:14:15] Sara Vieira: Just admit it.

[00:14:18] Michael Jackson: Yeah, yeah, it was. Yeah, and, and it was Ember, and I was, I was, I, I just couldn't do it. I could not finish the app. And and for me at the time, I had actually put, I I put, I put a, I put like 18 months into this project. I invested like a whole year's worth of my salary, uh you know, that I had saved up to like work on this startup. I I was, I was trying as hard as I could to make this app. And to ship it, and I just couldn't get the level of of polish on the functionality, on the features that we wanted to. And we we had scaled way back on the features and everything. It wasn't a problem of feature creep. It was just a problem of I I I I I can't finish this thing. I just can't. And uh and and and and I and I was like, it it and I hit the I I got to this kind of deep, dark place where I was like, maybe maybe I'm just not that smart. Like maybe maybe I'm just not a good developer. Maybe I'm not a developer. Maybe I'm a salesperson who got tricked into writing code. You know, like maybe I should be working in HR or like marketing or some other thing, not writing code. And uh and then React came out and I was like, oh, I was just I was just not using the right tools.

[00:15:41] Michael Chan: Well, I mean, the right tools I think didn't exist, at least for the way that we think about the web, I think. And we had a similar thing where we, you know, we had all these Rails apps and we had- the company that I joined had just put out a kind of single-page application, like the first one, and it just, it just became unmaintainable. Like no one had any idea what it was doing. Like all of those, like, I mean, those same like setTimeouts for like 13 milliseconds, like why? Nobody knows, it just works now. And We had kind of come to that same thing. We were like, you know what, screw it. Like, we're just gonna build Rails apps again because like that was the last time these things worked is like when we had a fresh request response, like anytime anybody did anything. And I love, like, I love that React kind of modeled that. Like the mental model for React kind of coming into it from the other things was just like, hey, this is almost like what you're used to. Like you do something and the whole thing, like just think that the whole thing re-rendered as if you got like a new page. And, um, yeah, like, that was transformative for me.

[00:16:44] Sara Vieira: I think it was also the thing of, um, it made, it made sense the way you structured things and the way you made things. It just made sense.

[00:16:51] Michael Chan: Yeah.

[00:16:52] Sara Vieira: Like, I think in the problem with Angular 1 or whatever it is that you were using is that you neither- you, you had to learn JavaScript and then you had to learn Angular. Yeah. And then you had to piece those two things together and then you were like, okay, okay, okay, I got this, I got this. But then you didn't. And it was pain again. And when React came, it was like, oh, so I wanna make a header, so I make a header component. Wait, that that makes sense.

[00:17:18] Michael Chan: Yeah.

[00:17:18] Sara Vieira: Everything is on this file. Oh, okay. Why did no one think about this earlier? It's the thing about React. It sounds like such a simple concept, but it's so powerful. The component idea is so powerful because it makes sense.

[00:17:33] Michael Jackson: And and I wanna I wanna riff on something that you said, Michael, with the you know, the Rails kind of request-response cycle. Um, because I think in those components, uh, that Sarah's talking about, the, uh, you have kind of a miniature request-response cycle going on all the time with the setState and render. setState is like your request, and then the response is like, well, what do I render now? What do I render in response to the to the to the setState that just happened? So that's awesome. So it's cool. So so you feel like React has has been a- Uh obviously a huge departure from what you had before. And uh and you don't have so many like what's going on timeouts and and setTimeouts and things in your code now.

[00:18:14] Sara Vieira: I don't remember- I take it. The last time I've used the setTimeout. And if I did, I probably deleted it afterwards. Because like it was the like the Apollo thing. So Apollo's being a bitch. No, I'm dumb, not Apollo. Apollo's okay. Um I don't remember the last time I used the setTimeout. Also because We don't deal with digests and weird stuff that doesn't actually belong in the DOM or in the virtual DOM. I think that was the main issue. There's no weird cycles. That's it.

[00:18:42] Michael Jackson: Yeah, so I never actually, uh, I never actually used Angular, so I can't-

[00:18:46] Sara Vieira: I've only used Angular 1. I've never used Angular after that. So I'm only talking about Angular 1. I don't wanna get punched in the face. That doesn't sound very nice.

[00:18:55] Michael Chan: So what was the first thing that you made and how was, like, with uh, with React or um- GraphQL and and and what was it that felt like revelatory to you?

[00:19:06] Sara Vieira: I think the main thing that, so I think I actually started on the server. Okay. And made a small server in GraphQL.

[00:19:13] Michael Chan: Okay.

[00:19:13] Sara Vieira: And I was like, okay, so this this looks cool, but what does this do on the frontend? Then I remember that I used GraphQL on the frontend. It was something like extremely simple. I think I started actually like um with uh creating something on GraphiQL. And just using it on the front end. And I think like the most amazing thing was there was no loadings. It was just the, the, the idea of having a set state of loading became dead to me. And, and now I look at stuff like getInitialProps and I'm like, I don't need this. I don't have a loading. It's amazing.

[00:19:48] Michael Jackson: That's very interesting, Sarah, because that, as far as I can tell, is like one of the main goals of the async React work. I don't know if you've looked into or had time to sort of, you know, listen to any of the stuff that the, you know, that Dan has been saying or any of the other members of the React core team. He gave a talk about it at uh at the React Iceland thing, you know, a couple months ago.

[00:20:08] Sara Vieira: We actually, uh uh we had our standup at 10 and we pushed it to 10:30 to watch Dan's talk.

[00:20:14] Michael Jackson: Yeah, totally. Uh it's it's the new like Steve Jobs keynote, right?

[00:20:19] Sara Vieira: Yeah, exactly.

[00:20:20] Michael Jackson: When the React team announces something.

[00:20:22] Michael Chan: So true.

[00:20:22] Sara Vieira: When Dan goes to give a talk,

[00:20:24] Michael Jackson: But one of the one of the interesting things uh you know that he that he talked about, or at least he might not have actually talked about it, or maybe this is just what I took away from it, is that you know there's this pattern that happens a lot in React code when you have requests mixed into the cycle, when you have data loading or I/O going on uh in the in in your React components, is that you've got like this loading flag, this loading state. And and you're showing a spinner, and now you're not. You have the data. And I think that's part of kind of what they're trying to address with, you know, the async sort of fetchers in your render methods. Um and and now I'm hearing you saying that, hey, you know, when I was building this GraphiQL app, uh or, you know, I was using— uh when I was using GraphQL, uh that all of that stuff was just dead to me. I didn't I didn't have any of that, you know, loading state anymore.

[00:21:18] Sara Vieira: It just, I think it's one of those most common issues that we have. I remember that uh when I started using uh React, we used it with Redux and we had so many actions that was just like set loading. And also like the loading isn't always in the same place, which actually becomes a problem because then you have to create several loading actions that are slightly different because they set loading in slightly different places, kinda. And are slightly different loadings. And this is something that I think with async and with GraphQL, it's pretty much dead. I have, for this thing that I'm building right now, I have one query component that has a loading and just returns the children as a function. So basically what the query component from React Apollo does, but it's just wrapped so that the loading is always the same. I did one loading and that was it. Nice. A single page app that has several pages with different stuff, with mutations and queries and everything, only has one loading is kind of amazing.

[00:22:22] Michael Jackson: So you have one, you have one component that's doing all of the fetching of the data and everything?

[00:22:27] Sara Vieira: So I have like, I, so there's the query component from React Apollo. I just have my own query component basically.

[00:22:34] Michael Jackson: Yep.

[00:22:34] Sara Vieira: And it just does like, if loading, return the loading, if error, return the error. If none of these things happen, render the children with the data. So all I get is the data basically. So every time I call that component instead of the React Apollo one, I just get the data. It's so good.

[00:22:50] Michael Jackson: Got it.

[00:22:51] Sara Vieira: It also works for local stuff, so it's so good.

[00:22:54] Michael Jackson: So uh yeah, around, just just kind of FYI, Sarah, around here we call children as a function, we call them render props.

[00:23:02] Sara Vieira: Sorry.

[00:23:03] Michael Jackson: No, I'm just teasing.

[00:23:05] Sara Vieira: I don't, the thing is, I don't like the term render props mainly because they're-

[00:23:09] Michael Jackson: Oh, oh, oh, hold on, hold on, hold on. No, I want to hear- I want to hear you, what you have to say about this, because I've heard- I've heard some- some grievances from a bunch of people. There was a guy at Twitter- on Twitter just the other day who was like, yeah, the term render prop sucks. So here, I- here I am. Hold on, I have to get ready. Okay.

[00:23:25] Sara Vieira: I'm just- I get very confused by render props because people say render props and then it's a render prop, and sometimes people say render props and it's children returned as a function, and I always have to click links. To know what they're talking about. And it's just like-

[00:23:41] Michael Chan: You know, I would like to-

[00:23:42] Sara Vieira: They gave two names.

[00:23:44] Michael Chan: I would like to hear your defense on this, Michael.

[00:23:46] Michael Jackson: Well, what I wanna understand is, is her confusion, is, is it that, is it that you think, is it, are you wondering if the prop is named render?

[00:23:56] Sara Vieira: No, there's a lot of people that use render props and basically what they do with render props is create a prop named render that renders the component and then they just call props.render as a function.

[00:24:06] Michael Chan: Yeah, it's like a like an inversion of control. They're just saying like, hey, delegate render to whatever I give you, right?

[00:24:11] Sara Vieira: Yeah, exactly. Yeah. And I usually use it as calling children with the function. So I just, I don't know anymore, Michael.

[00:24:21] Michael Jackson: Yeah, no, no, no, no, no. I I mean, that's a totally legit, that's a totally legit concern. I think the uh I think the name render props is uh people think it's a prop named render, but it's not. It's a- you can name the prop whatever you want, right? It's just a prop that you use to render stuff, but it's not a prop named render necessarily, right? So the prop could be named children, but uh I just couldn't- I just couldn't deal with like- because there was like children as a function, then a function as children, function as child component. I was recently at a training, uh, one where at, uh, uh, I, 'cause I run these React workshops, and there was this guy who was like, we call it function as child element. Oh wow. What?

[00:25:08] Michael Chan: Wow.

[00:25:08] Michael Jackson: Face.

[00:25:09] Michael Chan: No, these—

[00:25:10] Sara Vieira: You actually have more than one element.

[00:25:12] Michael Jackson: Yeah, I mean, they made it into an actual word.

[00:25:15] Michael Chan: Face.

[00:25:15] Sara Vieira: But what if you have 3 elements? Is it function as a rendered elements?

[00:25:21] Michael Jackson: Well, the, well, the, the way-

[00:25:23] Michael Chan: Factory.

[00:25:24] Sara Vieira: Function as a fragment.

[00:25:26] Michael Jackson: The one that the one that I uh the one that I was not a fan of was the function as child component. Because if you abbreviate that, it's just F-A-C-C or like fuck. And and and it's like it's like our code is like already hard enough to like reason about without people throwing that one around, right?

[00:25:51] Michael Chan: You know what, I think that's it though. That's it for me. That's what I'm gonna call it from now on. I mean, that's that's the sound I make when I'm coding anyway.

[00:25:59] Michael Jackson: Why don't you use a fuck in there and you'll uh you'll fix that component right up. A what?

[00:26:04] Sara Vieira: This is my fuck component.

[00:26:06] Michael Jackson: What do you want me to use?

[00:26:07] Michael Chan: You sit down to pair with someone and you're like, what do you- Fuck. Oh no, no, that's just what I recommend. I recommend you use a fuck.

[00:26:13] Michael Jackson: What do you want me to do to my code? What are you talking about? That's terrible. Don't say that.

[00:26:18] Sara Vieira: Fuck up that code.

[00:26:19] Michael Jackson: It's terrible. That that's just- I was just trying to save us all from that. Okay, so render props, RP, there's no weird

[00:26:28] Sara Vieira: Okay, so I have this query component that has render props. Got it, got it.

[00:26:32] Michael Jackson: No, that's a valid- that is a valid critique of render props. We shall- we will take that into- I will, I will consult you the next time before I decide on a name for something.

[00:26:40] Michael Chan: You know what though, it's like, it's, it's like all things, like the stickiest names are rarely the most accurate. Like the- what was it, the stateless, stateless functional components? I think they're still called functional components, which like drives me crazy. Like the whole functional Like, I can't read that and not think, like, this thing works. It's functional.

[00:26:59] Michael Jackson: I think probably, probably one of the best names I've ever seen is Create React App. It's like-

[00:27:05] Sara Vieira: It does exactly what it tells you to do.

[00:27:08] Michael Jackson: I mean, and it's totally Googleable, right? You can just Google, how do I create a React app? I guarantee you that's the first thing you're gonna find.

[00:27:16] Michael Chan: Or like Kent Dodd's new testing thing, React Testing Library.

[00:27:20] Michael Jackson: Yeah. This is just-

[00:27:22] Sara Vieira: We gotta go simple on things, or we try to like, like screw them up.

[00:27:26] Michael Jackson: Like, who puts the word library in their npm package name? Like, like, that's like me saying like, this is the React Router package. Like, React- like, it's obviously a package, it's on npm. Like, why are you- anyways.

[00:27:42] Sara Vieira: Inception.

[00:27:43] Michael Jackson: Yeah, it was genius though. It was genius because now you Google for I need a library for testing React. Oh, there it is right there. Boom.

[00:27:51] Michael Chan: There's the one.

[00:27:52] Michael Jackson: Got Google juice for days.

[00:27:54] Sara Vieira: Yeah, there we go. So we got Testing React Apps and then one from FreeCodeCamp and then Kent C. Dodds React Testing Library.

[00:28:01] Michael Jackson: So you've done- you've actually done uh quite a bit with testing yourself, Sarah. You did a couple of uh testing uh testing workshops in React. Is that something that you've been— uh that you've kind of specialized in or that you've really uh kind of been passionate about?

[00:28:16] Sara Vieira: So yeah, uh the thing is I didn't really do a lot of tests back when I was doing Angular. And then I think the somehow the same thing happened in uh React and I was like, oh, okay, so this this makes sense. I can just like get the elements and there's no weird stuff. So I've been also because I I've never been one of those people that does TDD or anything. I'm always the person who was like, oh shit, I forgot to do tests.

[00:28:45] Michael Jackson: That's 99% of developers. That's all of us.

[00:28:49] Sara Vieira: I know, but people lie about it and I ain't taking that bullshit, okay? I'm that person. It's fine if you're that person, okay? It's like Google Analytics. You're like, oh, look at this, I released this, and then 10 minutes later, like, shit, I forgot to put Google Analytics on that. You're like, how many people are using it?

[00:29:05] Michael Jackson: You missed all of those people who clicked through on the announcement post?

[00:29:09] Sara Vieira: I have no idea. 10? 10,000? One in between?

[00:29:15] Michael Chan: So what inspired you then to uh start uh teaching people how to test?

[00:29:20] Sara Vieira: Because the thing is, testing wasn't fun. And like, I think that with React, it's not that- it's not like- testing is never fun, okay? Yeah, just don't, don't, don't come to me with that. There's no like actual result of that. I mean, Jest kind of helps with the green stuff and you're like, yay, green! But yeah, um, so I wanted to be like, okay, I know you don't like this. No one does. It's fine. Okay. But I wanna teach you some ways that you can do this where you're not gonna cry.

[00:29:48] Michael Chan: So what are your, uh, what are your high levels then? What are, what, what, what can people take away from, uh, you know, if people aren't testing their code right now, what are like 3 things they should be, uh, should know to make it more fun? Not crying.

[00:30:02] Sara Vieira: Not crying. Not crying is important. Okay, so I think the first thing is I find it- I find it very, very much easier. Much, much fun. Yes. Yeah. Whoa.

[00:30:13] Michael Jackson: No, I know. I know, much

[00:30:15] Sara Vieira: fun. English is hard. Okay, so I find it-

[00:30:17] Michael Chan: it is- it's a dumb language.

[00:30:19] Sara Vieira: There are a lot of words that mean the same thing but then really don't. Yeah. Yeah. So, uh, one thing that I've taken away from like doing React for a couple of times, not as much as Michael or Ryan or anything, but for a couple of times is that I find it a lot easier to manage components if they're just like stateless components. They're much, much easier to to manage. So one of the things that I usually say is just like try to go with stateless components when you can. It's not that I think that state is bad. State is not bad at all. I made entire apps using just setState. I don't get the hate on setState. Dude, it's good. Chill. Like it's it's not it's not a bad thing.

[00:30:56] Michael Chan: setState is great.

[00:30:57] Sara Vieira: That's that's great, I love it. Love it. But like, to test, it's much easier to test like these functional components. Sorry, sorry, Michael.

[00:31:05] Michael Jackson: No, no, it's fine.

[00:31:07] Sara Vieira: These stateless components that- I'm trying, man. You gotta you gotta give me a coin for trying. I just get props and render something and you can just change the props. The best thing that I try to teach people is like, what if you send it like nothing? What happens? They're like, oh, it breaks. Yeah.

[00:31:23] Michael Chan: It's beautiful.

[00:31:24] Sara Vieira: It's beautiful. Look at look at your page that has nothing. It's like just, it's one of those jokes where I once heard a joke. It's like a QA tester goes into a bar and orders 3 drinks, minus 90,999 drinks and 9 drinks. And yeah, that's the, I think testing all of the props that you get in all different ways and just the rest of it, you can usually just test like you have pure functions in your React Like, you can't just do everything with React. You need to like install packages and have functions that just like, even if it just trims something. Sure, yeah. Just test those functions separately, don't need any React stuff, and then just do some prop testing and check out check out if the elements that you think exist exist, and check out that if you don't pass some conditions that it actually doesn't break. 'Cause I've realized so many apps that So many stuff that I've done, I was like, oh, what if I pass it an empty array? Oh shit, my app's gone.

[00:32:20] Michael Chan: Yeah.

[00:32:22] Sara Vieira: Oh, oh, I gotta fix this. It's the, it's the dreaded, you gotta search for length first before you map and always search for length, by the way. And I think that's the main takeaway that I can, I can give is try and like make everything not like, try and make stuff stateless. Just like make one component that is stateful and then it just passes stuff to the other components that are all stateless. Because it'll be much easier to test the other ones and then you just have one giant one to test. So there's just one. It looks easier. Does that make any sense?

[00:32:57] Michael Chan: I totally agree. I think that one of the biggest problems is people don't- like they don't have enough tolerance for having like a gigantic smart component at the top of their app with like a bunch of tiny little, uh, you know, I don't know, dumb or stateless or whatever you want to call them. The ones that are just functions. Um, and you know, everyone wants to like break up that state into like a bunch of different places. But I totally agree with you. Like there's something so liberating about having like just one smart component and just a bunch of things that are just functions basically.

[00:33:31] Sara Vieira: So in this app that I'm building, I have like what, like, uh, yeah, if I search for Components, maybe nothing happens. I have like 3 components that actually are components, like extends from component from React. The rest is just all like func stateless. Got it. Nailed it. Stateless stateless components. That's it.

[00:33:51] Michael Jackson: So in fact, this is, this is actually how I actually recommend building a lot of apps to people for the very first time, because I, I think that when you're, when you're starting to build an app, it's not obvious like what state you're even gonna need. Or where that state even needs to live. And so lots of times what I do when I'm starting on an app from scratch is I will just build out the views as just these these stateless functional components, or just functional components, or whatever.

[00:34:19] Sara Vieira: No, both. They're stateless and functional.

[00:34:21] Michael Jackson: Yes, we need- Michael, you need to name this one.

[00:34:23] Michael Chan: Well, okay, so you're the one who got me thinking about that, is because you were like, well, yeah, they're stateless, but really they're lifecyclelessness. That's the really- that's the big thing right there.

[00:34:37] Michael Jackson: Ain't got no lifecycle.

[00:34:38] Michael Chan: You ain't got no lifecycles.

[00:34:40] Michael Jackson: Yeah.

[00:34:40] Sara Vieira: Nobody got time for lifecycles.

[00:34:42] Michael Jackson: One of the more interesting things that I've seen in this space is, um, have you, have you all seen, uh, Ryan actually did something called React Component Component?

[00:34:54] Sara Vieira: I don't think so.

[00:34:54] Michael Chan: That's, if I remember correctly, I think I-

[00:34:58] Michael Jackson: Look it up.

[00:35:00] Michael Chan: It basically delegates all of the the internal methods as props, right?

[00:35:05] Michael Jackson: Yeah, yep, yep, you nailed it. Yep, so all of the lifecycle- so it's like a component that has props called, and one of the props is called didUpdate, and one of the props is called, you know, didMount, and one of the props is called willMount, right? And and to these props, you just pass functions. So So you could literally um avoid ever extending React class. And you just you just create uh components uh all the way down. So whether so if you need the life cycles, you just pass them as a prop to your component. And then you've then you've got a life cycle. And if you don't, then you don't. And not a big deal. Um which is a which is a really cool uh abstraction because now If you're developing now, you have to decide as a developer, uh, which one do I need? Well, do I need state and the lifecycles? Okay, then yeah, I have to extend React.Component. Otherwise, if I don't need state and the lifecycles, uh, I can just use a pure function, right? And and what this what this abstraction does, what React.Component.Component does, is it makes it so that you can just- like, you never have to make that decision ever again. If you just render one of those things, and then if you need the lifecycle, then you just pass some extra props. And if you don't need the lifecycle, then you don't.

[00:36:24] Michael Chan: Yeah, I really like that. I have, I have like a similar one called- I think I called it like an inline component or something, experimenting in the same like space. But it is, it is really nice. It, it is a bummer in terms of, uh, like I never ended up using it because of the, the documentation issue, right? Like it's so hard working on a team and they're like, what the heck is this thing? And like, all of- like, like, nothing's Googleable in it.

[00:36:47] Michael Jackson: I mean, I can imagine it would be hard to scale that approach on a team, but I think as, as, uh, you know, as, as like a somebody who writes library code a lot, I think it's-

[00:36:57] Michael Chan: Oh, totally.

[00:36:58] Michael Jackson: I think it's interesting, you know. I think it's interesting that like you essentially take that decision of, oh, should this be a class or should this be a function, and that decision is gone. It's- yeah, it's neither. It's just a

[00:37:10] Sara Vieira: Also, I feel like one of the things that I end up doing very much, because I'm slightly lazy, is that every time I have to turn- it's like, oh, I'm like, oh crap, I need state. Every time I have to turn like a component into a stateful component-

[00:37:25] Michael Chan: Oh gosh, the worst.

[00:37:26] Sara Vieira: No, I'm just like, can I make some weird-ass hack which I don't have to do this work? And it's like 2 lines of work. That's it. But it's like, it's so frustrating to you as like, you feel like you failed.

[00:37:37] Michael Chan: Yes.

[00:37:38] Michael Jackson: Yeah,

[00:37:38] Michael Chan: like, I should have known, I should have known.

[00:37:40] Sara Vieira: Yeah, goddammit.

[00:37:41] Michael Jackson: It breaks up your flow a little bit, right? You're like, oh, now I gotta go back and refactor this thing.

[00:37:47] Sara Vieira: So I actually think I'm gonna pop in this uh React component component. It sounds like a really good idea. I'll just add it as the README. It's like, what is this weird thing? And then a link.

[00:37:56] Michael Jackson: Yeah, yeah, it's it's pretty it's pretty interesting actually. I think there might be like some uh There might be some issues to sort out. So the main one I think would be in this abstraction, how do you decide- so like, you know, normally you can, if you want to be pure, then you can extend PureComponent, which a lot of people like to do because then they say, if I extend PureComponent, then I don't get re-rendered unnecessarily, yada yada yada. And that's important sometimes. And I don't see a really clear, easy way to do that with the React component component because it makes heavy use of functional props, right? Like every single prop essentially is a function. Yeah. And you're generating those on every single render. So you have to find either some way to like memoize those functions, which you could totally do. Um, but uh but but but anyway, yeah, you lose the you lose the ability to be like a pure component, which you know, in the long run may not be necessary. But anyway, it's, it's an interesting experiment for now, for sure.

[00:39:05] Sara Vieira: Yeah. I also think it's not something that you can just put on the top of your app. I mean, you can, you can do whatever you want. Like, really, it's React, you can do whatever you want. But I don't think it's something that you should put on the top of your app with like 5 states, different stuff. It's like something where you're like, oh my God, I just need to set this one state. I'm gonna have to change the entire components. Oh. React component component.

[00:39:26] Michael Jackson: Yeah, yeah, that's cool.

[00:39:27] Michael Chan: So I have, I have a question. I'd be- it's a topic change, but I'd be remiss not to bring it up. Um, I think the first tweet I ever saw of yours, Sarah, was the, um, the, the destructured pony.

[00:39:40] Sara Vieira: Uh, yeah, I still have a couple of those stickers. I ordered like 200 of those.

[00:39:44] Michael Chan: Oh my gosh, I, I need to find a way to get one, get one from you because I love that so much. How did that come about?

[00:39:51] Sara Vieira: So I went to this conference called JS Heroes. If you want to come to Europe, dude, you gotta go to JS Heroes. That thing is amazing. Romania is great. It's like Portugal, but with a different language. It's great. I love it. It's like home away from home where you can rent cars by the minute. It's great. Um, so I went to this conference in JS Heroes and they tweeted like, we're looking for stickers. And I sent them- I don't really remember what I sent. Sent him, but it was something like super- I was like, oh, I'm gonna make some stickers. And I sent him like this weird unicorn sticker. It was just a unicorn. And and and someone told something about deconstruction. I was like, I know what I can do. I know what I can do. That was pretty much it. Like, I have no design. I don't know what I'm doing.

[00:40:33] Michael Chan: It looks amazing. It's it's really the most uh like beautiful example of destructuring assignment I've ever seen. Like, I want docs to look like that. Like, they start with just a graphic that looks like that, that explains it better than, you know, a thousand lines could.

[00:40:49] Sara Vieira: I really wanna get more stuff that is not uh as- oh, Michael. Okay, cool. I also wanna find more stuff that is not easily explainable and try to explain it like this, because I think it's an amazing way to actually learn.

[00:41:04] Michael Chan: Oh, I totally agree. I, I, um, I did kind of an experimental talk at a meetup one time and it was just exploring uh React patterns like through a shape-first kind of concept. You know, like if I was trying to explain it to like a 5-year-old and It was it was a lot of fun and it helped me understand it better. But like a lot of people were like, oh, I never understood that thing. But now that I can like think of it as like a, you know, a basketball hoop and a and a basketball, like I totally get it now.

[00:41:32] Sara Vieira: Yeah, it makes I think it but yeah, but that depends on the people. Some people understand better by reading. Totally. If I see something, I understand. Like the dumbest example that I can ever tell you is when I was like 10 and I was I've been really into football or soccer or I don't know, the one with your feet. And I've always been into that for like since I was a little kid, but I never really understood offsides. Like, it didn't make sense to me. Yeah, still a goalkeeper, and I was like, this doesn't make any sense. And then I saw one image, one image, it was like the defense, and then the guy was in front but the goalkeeper was still back. And I was like, oh, why can no one just show me this before?

[00:42:11] Michael Chan: Yeah, yeah.

[00:42:12] Sara Vieira: And all of a sudden I understood all about offsides. That was about it.

[00:42:16] Michael Jackson: Yeah, I, I love- no, I love the, uh, I love exploring the differences between, like, as a- because as a teacher, like, visual learning versus, I guess, just hearing something, or, um, you know, uh, learning something by, like, doing, you know, learning something by, like, getting your hands on and, and doing it. Sometimes I'll be up in front and I'll be teaching something about, like, Like higher-order components is always the one that throws people for a huge loop. They're like, wait a minute, higher-order component? And I'm like- and then I'll just I'll just throw up this picture of like something wrapping something else. Like, see this, this wrapper, this is the this is the higher-order component. This is your real component. And then it's like, oh, okay, yeah, I get that, right? Um, for the for for a lot of visual learners, that helps to kind of see it like that. But uh but yeah, it's that's kind of the the tricky thing as a teacher, which we've all done, uh is uh is is like trying to trying to figure out like how to communicate with people, right? And trying to trying to speak to the way that they learn.

[00:43:19] Sara Vieira: I think also one of the coolest things that you can try and do is try to teach stuff that is very uh technical to someone who's not technical at all and make them try and understand. So I have this t-shirt like a week ago and this says like, um, I got a ask me about GraphQL t-shirt. And I have this friend who was like, what, what is GraphQL? And I'm like, oh God, no. And she was like, no, I want you to tell me. And I was like, but yeah, I know, but I don't wanna. And she was like, okay, just explain to me what GraphQL is. So I got a napkin and I got my phone and I was like, so this, my phone is the front end and the napkin is the back end. And when you're like, opening a website, imagine how you're opening YouTube and you just want the name of the video. It just sends you all of the napkin in your face and you're just like, what the fuck is this? What GraphQL does is basically like it breaks your napkin into pieces and just gives you like the part of the napkin that you want. And she was like, so that makes websites faster. And I was like, yes.

[00:44:17] Michael Chan: Oh, nailed it.

[00:44:19] Michael Jackson: She can immediately derive that piece just from that example, right?

[00:44:22] Sara Vieira: She has no idea what it is, but in her head it makes websites faster.

[00:44:26] Michael Jackson: Yeah,

[00:44:26] Sara Vieira: you get less stuff, so that's good.

[00:44:28] Michael Jackson: And then we have, we have like all these technical terms for that, right? Like over- overfetching and all this stuff. And it's like- Oh

[00:44:34] Sara Vieira: yeah, yeah, no, I didn't get into that.

[00:44:36] Michael Jackson: Yeah, yeah, yeah, yeah, yeah.

[00:44:38] Michael Chan: That's called overfetching. She's like, okay, yeah, no, now we're done.

[00:44:41] Michael Jackson: Yeah, I don't care.

[00:44:42] Sara Vieira: She's gonna get up. If you do this, no, no, no, do this. You don't need this. You don't need all comments in this post, okay? You just need name of post. Good, cool.

[00:44:57] Michael Chan: I agree. Those are, those are my favorite like types of resources, the ones where they're just, they're just like good, bad, and then, you know, maybe they have a paragraph on why. And then you're like, okay, cool, like I can live with that. Like that, that seems reasoned enough.

[00:45:10] Sara Vieira: I think also the main issue that's going on is that like if I say something is bad, I mean it's bad for me. It doesn't mean that it's actually bad. I don't know if it's It's bad. It didn't work for me.

[00:45:20] Michael Chan: Yeah.

[00:45:21] Sara Vieira: And um, that's why like I think I have so many problems with saying like, this is bad, because like for some people it may work way better. But to me, I'm just like, why?

[00:45:30] Michael Chan: Yeah. You see that a lot with with like binding, uh like uh binding uh event handlers and whatnot. Like everyone's like, oh, this is bad and this is good. Like, well, I

[00:45:41] Sara Vieira: mean- No one cares.

[00:45:42] Michael Chan: Maybe.

[00:45:42] Sara Vieira: It's like, do your thing, man.

[00:45:44] Michael Chan: Yeah.

[00:45:45] Sara Vieira: Do your thing. Just do always the same thing. That's it. Like on one app, try to do always the same thing. If you change your mind between the app, refactor the rest. Because 3 months later, you're gonna be in this like, who made this? And you're gonna, you're gonna get blamed. It's gonna be you.

[00:45:59] Michael Jackson: Yeah.

[00:45:59] Sara Vieira: It's gonna be bad. That has happened to me. And it's not good.

[00:46:02] Michael Jackson: There's a lot to be said for consistency, for sure.

[00:46:05] Sara Vieira: Yeah. Yeah. So I don't think it's any problem changing your mind. And I think it's a problem when you're like, halfway through a thing and then you change your mind and then everything else just looks one way and then the rest looks another way. And in 3 months you're just like, oh, I guess I'm just gonna delete this. Just gonna burn it.

[00:46:26] Michael Chan: I hope no one sees this.

[00:46:28] Sara Vieira: And then there's a pull request to fix your stuff. You're like, oh my God, they saw that.

[00:46:31] Michael Jackson: And then you realize like 6 months later, oh wait, that that was that was me. That was me 6 months ago. That's who made this.

[00:46:38] Sara Vieira: Yep.

[00:46:39] Michael Jackson: Yours truly.

[00:46:40] Sara Vieira: Did it ever happen to anyone who was like working on a project and was looking at something, it was like something like, it may not have been bad, but it just looked horrible. It was like a huge hack. In this case, it was CSS. So it was just, it was just a bad thing of CSS. I think it had like importance and something like really weird upon it. And I was like, who the fuck in their right mind made this? I'm gonna shame this human being to death. And then I git-blamed it and it was me and I was like, oh, I'm gonna go home now.

[00:47:15] Michael Jackson: Never mind.

[00:47:16] Michael Chan: I should probably quit.

[00:47:17] Sara Vieira: I should- I should- I should quit. Why did I do this? What is wrong with me?

[00:47:22] Michael Chan: Well, this is good. This feels like therapy.

[00:47:25] Michael Jackson: We should probably wrap it up. We've been talking for almost an hour now and people are gonna- start turning our podcast off if we don't wrap it up. Um, so Sarah, tell us a little bit about what people can do to support you. What are you doing? Any, any cool- do you have any like workshops coming up or any open source projects that you're working on that you want to kind of draw some attention to?

[00:47:51] Sara Vieira: I'm do- I'm doing workshops in, um, in Odessa in Ukraine One of them is about styled components and CSS in React and stuff like that. That's with a friend. And I'm also doing one on, I'm doing two in GraphQL. In France, in Toulouse, and one in Kiev. So I'm trying to start doing some also GraphQL, like starting with GraphQL stuff. Mainly because like a week ago I did this, I had this meetup here in Porto and I didn't know what I was gonna talk about and I didn't wanna make any slides because I'm lazy. So I was like, you know what I'm gonna do? I'm gonna live code for 30 minutes.

[00:48:34] Michael Jackson: Nice.

[00:48:34] Sara Vieira: And it's gonna be great. Yep. And it actually didn't go as bad as I thought. So that was good, 'cause I didn't have to do any CSS. Um, and so the idea was that I created a GraphQL server using Prisma and then I created the front end of it using React Apollo and Apollo. And it took less than 30 minutes. So what I actually want to show people is like, it's not that hard. Nice. Because it gets to this thing where it's like only like the cool kids do it because it's so hard. It's actually way easier. It's so much easier. So just just trying to get into heads of people that it's like, it's not actually hard. Like anyone can do this. You just need someone to tell you that it's not hard and teach you some basis of this kind of stuff. So those are the 3 workshops that I have coming up. I think like one of them in Odessa is like $20 or something like that, and the other 2 are completely free. Awesome. So if you're from from Kiev or France in general, 'cause you got good public transportation, so that's fine, and wanna join, that would be great. Uh I've also started this thing about uh tech talks. It's called awesometechtalks.party.

[00:49:45] Michael Jackson: Yeah, that was awesome, that website that you made. That was really cool.

[00:49:49] Sara Vieira: I've been trying to like server-side render it for 2 days, Michael. That's what the comments are about. It's been pain because it has like React Router, Apollo, and styled-components, and all of that has to render server-side.

[00:50:03] Michael Jackson: Ooh.

[00:50:04] Sara Vieira: It's working now, so yeah, that's a thing.

[00:50:07] Michael Jackson: You're getting there.

[00:50:08] Sara Vieira: Yeah. Actually, React Router wasn't a problem. It was mostly the other two, so you're off the hook. Oh. You're good, you're good, you're good. That was like just pop in one place, pop in the other place. Nice.

[00:50:20] Michael Jackson: Static Router.

[00:50:22] Sara Vieira: Static Router.

[00:50:23] Michael Chan: At least Michael Jackson loves me.

[00:50:24] Michael Jackson: Hey.

[00:50:25] Sara Vieira: Exactly.

[00:50:26] Michael Jackson: I was thinking about you. I was thinking about you when we when we designed that.

[00:50:30] Sara Vieira: No, but that was actually like a very good implementation for just server rendering stuff. Like there's like No weird functions. For example, like this thing, uh, so styled-components has an injectGlobal thing and I had it on the client.js and apparently I I I can't put it on the client.js because it doesn't work. Because it doesn't get it from like the sheet that collects styles and so I had to like just copy and paste it everywhere to try to figure out where I could use it that would render it and it was like, yes! Styled-components, got it.

[00:51:01] Michael Jackson: Yes. Sometimes when you're doing that server-side rendering stuff, it's like, wait, should this code run on the client or does this code run on the server?

[00:51:08] Sara Vieira: And then sometimes things that run on the client, get window is not defined and you're like, what?

[00:51:13] Michael Jackson: Oh, really?

[00:51:14] Sara Vieira: But it is. Oh. But I mounted the component. Oh. Also, this had like lazy load and that doesn't work anymore. So I'm adding actual pagination. So there's a lot of talks that actually need to be like revised. Mm-hm. To make sure that they're actually like cool and stuff. And uh that would be amazing if someone uh also wants to help with that. I can give them like GraphCMS access and they can just like add the description and stuff and just publish the talks. Because I've been trying to do the SSR thing because of mainly SEO and performance. And also, uh I have like a couple of conferences. I'm going to the Netherlands. I love the Netherlands. Oh, nice. I know, right? Nice. So good, so peaceful. Okay, so that would be amazing. And yeah, that's- I want to get this website into a really good state and then just trying to expand it to speakers. And like, there is a thing that I made with Carl- I don't know how to say his last name, so I'm not gonna butcher it- that was this huge list of really good speakers as well, and just try and merge all of that thing into there and just use different data from the same GraphQL server so that when you search for one thing or the other, you can easily find it. It's the naming thing. You're like, Awesome Tech Talks. There you go. awesometechtalks.party.

[00:52:35] Michael Jackson: Yeah, exactly.

[00:52:36] Sara Vieira: The naming.

[00:52:37] Michael Jackson: So you got, you got a couple of upcoming workshops. You got the awesometechtalks.party. awesometechtalks.party?

[00:52:44] Sara Vieira: No, it's just awesometechtalks.party. awesometechtalks.party. I didn't quite think about the name.

[00:52:48] Michael Jackson: No, that's fine. Then you can put talks about stuff other than tech. It'll be awesome.

[00:52:51] Sara Vieira: There is also a lot of like personal talks and stuff from TED and and and stuff that is actually just inspiring, has nothing to do with tech.

[00:52:58] Michael Jackson: Beautiful.

[00:52:58] Sara Vieira: Which is, yeah, it's good.

[00:53:00] Michael Jackson: So we will have links to all of that in the show notes. Um, last question, very last question, Sarah. Is there anybody who you want to give a shout out to or anybody who you think is doing awesome stuff in React that is not getting enough attention?

[00:53:18] Sara Vieira: Look, I want to thank- I want to thank Jared Palmer from the bottom of my heart.

[00:53:22] Michael Jackson: Yeah.

[00:53:23] Sara Vieira: Because I created an issue on After.js and he walked me through doing the entire server-side rendering.

[00:53:28] Michael Jackson: Oh wow.

[00:53:30] Sara Vieira: I know.

[00:53:31] Michael Jackson: And what a guy. We've had him on the podcast before. He is- he is a great guy.

[00:53:36] Sara Vieira: He's a great guy. Like, Formik is amazing. I actually didn't have any questions about Formik. I just popped it in and it worked.

[00:53:41] Michael Jackson: Nice.

[00:53:42] Sara Vieira: And like, I was trying to use After.js and I was like, oh, but you don't need this, you can just use this and you have to change this. And he sent me like huge bits of code, like you have to do this in order to make it work.

[00:53:50] Michael Jackson: Oh wow.

[00:53:51] Sara Vieira: Like looking at my own code. So I just, I really want to thank him because he saved my sanity in general. Like, that is amazing. I, because I would be hitting my head against the wall for so many reasons. I'm kind of a noob in like creating my own server-side stuff. So please have Jared Palmer here. Formik is amazing. Razzle is amazing. After.js is pretty cool as well. And he's just a super nice guy. That was one of the nicest things. That was so nice.

[00:54:18] Michael Jackson: Yeah, we actually- we had him on the show. He was like our very- he was our second- I think he was in episode 2. He was our second guest.

[00:54:26] Sara Vieira: How long ago was that?

[00:54:27] Michael Jackson: Uh, just a couple months ago. You haven't been listening to the React podcast apparently, Sarah.

[00:54:32] Sara Vieira: Sorry.

[00:54:33] Michael Jackson: This is something-

[00:54:36] Sara Vieira: hang your head and shame.

[00:54:38] Michael Jackson: Like, put your- no, no, you're good, you're good. Hey, thank you so much for uh for hanging with us today, Sarah, and for talking some React with us. Uh really enjoyed uh your perspective on uh just everything. Just you know getting started with code, moving to React from other frameworks, um you know testing, and and just the kind of the pragmatic approach. So uh thank you again so much for being with us today. And uh we We will have links to all the stuff that you mentioned in the show notes, and we will see you all next week on the React Podcast.