112: Kent C. Dodds on Epic React
News!
We have a YouTube channel for React Podcast 🥳
Watch the livestream of this chat with Kent and Subscribe for future chats!
Featuring
Links
- Epic React by Kent C. Dodds — Confidently Ship Well-Architected Production Ready React Apps Like a Pro. 30% off when this episode goes live.
- Epic React Podcast with Kent C. Dodds and chantastic
- Testing Library — Simple and complete testing utilities that encourage good testing practices
- The Beginner's Guide to React by Kent C. Dodds. Free on egghead
- Advanced React Component Patterns by Kent C. Dodds. on egghead
- KCD Discord
- KCD Learning Clubs
Related React Podcast episodes
Sponsors
Infinite Red
In over your head with a React or React Native app? Infinite Red can help. They're React Native core contributors who've been designing, building and shipping apps for over 10 years. reactpodcast.infinite.red
imgix
imgix delivers sharp, snappy images with powerful image processing and a simple API, on a global CDN. imgix.com
Transcript
[00:00:00] Michael Chan: This is React Podcast. I'm Chantastic. This week, friend of the show Kent C. Dodds spills the tea on his latest course, workshop, masterclass creation, Epic React. He shares what he's learned over the last 5 years as a React educator and why how you learn is even more important than what you learn. When you finish this episode and think, Wow, I wish there were 8 more hours of podcast content just like this! Well, you're in luck. Kent and I recorded a new podcast series for Epic React, and you can listen to all 9 episodes for free at epicreact.dev/podcast. This episode is sponsored by Infinite Red and Imagix. Working with Infinite Red gives you access to developers who know the direction React and React Native are headed. This is a superpower for your team. It means you can spend more time delighting customers with quality software and less time rebuilding your entire app because you picked a short-sighted state management library. Infinite Red have been designing, building, and shipping quality apps for 10 years and make their expertise and industry connections available to you. Infinite Red will give you $750 when you start or refer a new project. Get expert help from Infinite Red at reactpodcast.infinite.red. Unprocessed images kill performance. Front-end teams will optimize single kilobytes out of a JavaScript bundle only to throw performance away with large, unoptimized images that, despite their enormous size, still look bad on many devices. imgix helps you deliver sharp, snappy images to customers with powerful image processing and a simple API. Here's how it works. You put your master image on imgix, get it there manually or via build step. Now reference these images in your product to have imgix tune and optimize them perfectly for presentation on web and mobile devices. That plus delivery from their global CDN make imgix worth it, but they also give you a simple API for customizing images via URL. I can only describe this as imgix turning your image tags into a declarative Photoshop. You get basics like size, crop, position, et cetera, as well as creative APIs like filters, blend modes, text, and watermark overlays, and hundreds more. Follow the lead of Unsplash, Kickstarter, Prismic, and others who know the importance of image optimization to user experience. Get a $300 account credit at imgix.com/reactpodcast. That's imgix, I-M-G-I-X, .com/reactpodcast. All right. Kent, welcome back to React Podcast.
[00:03:00] Kent C. Dodds: Oh my goodness, Michael, thank you so much for having me back. I love it just chatting with you. We've talked a lot in these last like month and a half.
[00:03:08] Michael Chan: We have, we still, we have some secrets, but uh you know, I think, you know, they're gonna be revealed and uh it's gonna be fun and I'm really excited for uh people to find these uh little Easter eggs. How have you been? It's been probably like a, I don't know, maybe a year since we uh we talked. I can't even remember what we talked about last.
[00:03:25] Kent C. Dodds: Yeah, I-
[00:03:26] Michael Chan: Maybe hooks?
[00:03:27] Kent C. Dodds: Maybe. Uh, like, was it, uh, was it at React Rally? Was that the last time we did a, an episode together? I can't remember.
[00:03:35] Michael Chan: Yeah, I, I think so. I think maybe we were talking about- okay, if I remember correctly, it was like we were talking about hooks and like your kind of like guiding principle at the time was like, hey, don't go, don't go like rewrite your app in hooks yet. Like, don't believe any of the articles that are gonna come out about like these are the like the best practices in hooks because like nobody knows. So it must have been like a year and a half ago or so because we've had hooks for like 2 years now, right?
[00:04:04] Kent C. Dodds: Yeah, yeah, for real. It's been uh like, it's it's kind of weird. It's like with my marriage, I'm like, I can't remember life without you, um, but I know I haven't had my whole life with you, so I like, yeah.
[00:04:18] Michael Chan: There was a time.
[00:04:19] Kent C. Dodds: There was a time when we used to not have hooks. And uh yeah, so, it's been a while.
[00:04:24] Michael Chan: Yeah, yeah, yeah, yeah. It's been a minute. Um, and so, now I feel like maybe that like, maybe that advice has probably uh had its moment. And we're actually getting to a point where there are some pretty good, strongly established uh hooks practices. And even though the docs don't reflect that yet, still showing classes and whatnot. Um. That the world has kind of like moved on and uh is is using hooks and like has a pretty good understanding of them and whatnot. Um, so, I'm excited to dive into a lot of what you've learned since the last time. But first, kind of like in all of that, I just want to start talking about your your course. Like you have now- you're launching, I think probably by the time this goes live, you're launching just this mega React course. And uh it's just- and and I want to hear all about it. So, um tell me a little bit, like the high-level pitch of like what this is. And we're gonna talk about like what it is to you, what it's gonna mean to people, all that kind of stuff. But tell me about Epic React. Like what is it?
[00:05:30] Kent C. Dodds: So, Epic React is um my biggest effort yet at trying to make the world a better place through educating people. Um that's like my my entire goal of of everything that I do is how can I Um, how can I make the world a better place for me, for my wife, for my kids? And um, and I do that best with software, and I've learned that I'm really good at teaching other people how to write good software, high-quality software. And so, the best way that I can make the world a better place is by making just really, really good um instructional material and and scale way beyond myself. So, I've I've given- a lot of workshops to a lot of people, but I only scale so much. And so, um, Epic React is basically all of the knowledge that I've accumulated and and been able to distill into a teaching um form, and um and scaled it beyond myself. So, recorded it, um complete with all the exercises and everything, um and and created it in a way that's very self-paced, so people actually, like it's not just a collection of videos, but it's actually something that you'll learn. Uh learn this stuff. And uh yeah, just so much of my life has been dedicated to how can I take the knowledge that I have and transfer it into other people's brains. And that's what Epic React is for.
[00:06:52] Michael Chan: Nice. Well, I know that a lot of people might not know. I mean, a lot of people know that you've been putting out content. They might know you from, you know, Beginner's Guide to React or some of your, you know, Suspense course that came out last year. Um, but they might not know that like you're doing, you know, workshops like All the time. You're constantly helping companies and people kind of develop in React. And it seems like through that, you've probably like learned a lot through like kind of seeing people's like real-world problems and like the things that they're trying to solve with React. What has been kind of like some of the most surprising things that you've learned as you've been like kind of like boots on the ground with a lot of people kind of like working in their apps, working and like training their companies, et cetera?
[00:07:41] Kent C. Dodds: Yeah, so like you're right. I it's interesting. When I went full-time teacher, I was worried that it would mean that um I no longer get exposure to big problems, right? Because now I'm just working on little demo apps, little education apps, whatever. But that turned out to not be at all what happened. What actually happened is I I get more people asking me the hard questions that they face in their apps. And so I actually get more exposure to the hardest problems, um which is kind of been an interesting thing. And so, the the stuff that I see in um people's code, or or like the biggest surprises to me, I guess, is that I- honestly, the biggest surprise is that I see the same things over and over again. And this is like, this is where my uh blog posts come from and everything. It's like when I see the same thing a couple of times, I'm like, okay, I've absolutely gotta write a blog post about this. Because um I and and unfortunately not I not everybody reads my blog posts, so and so I still see those things, but now I can at least link them to the blog post instead of having to answer it all again. Um but yeah, like uh stuff, you know, there's all the testing side of stuff that I'm I'm pretty well known for and and testing implementation details and stuff, I see that all the time. Um and then there's there's the hooks side of things, um where, you know, people ignore the ESLint plugin uh because they say, well, no, I don't want this to you know this to rerun, or I just want this to run on mount. Like, those are really common um attitudes, and and mostly those are common attitudes from people who are uh experienced React developers who've been doing classes, and they're thinking about life cycles, and now they're trying to transition that knowledge over to to hooks, where there's a little bit of unlearning that needs to take place there. Sure. At least when you're thinking about things in the context of a hook. So, yeah, like that that's a really common uh common thing, like messing up uh useEffect. Um, over-applying useCallback and useMemo. Like, I could just look at my blog and be like, yep, I remember like the number of questions that were asked that like caused me to write this blog post. Um, so yeah, there, it's been a really interesting experience seeing um problems repeated. And especially as I go and teach these workshops, what's really cool about it is literally every time that I teach the workshop, as I'm preparing for it, I'm like, "Oh yeah, there was that thing that was confusing for them," so I'm like reworking the whole thing uh every time. So, like people say, "Oh, you just make the workshop once and now all of a sudden you just deliver it 100 times and like you're a millionaire," but no, no, every single time I'm giving a brand new workshop because I'm like solidifying this workshop material. Um, yeah, so it's- anyway, um, it's been interesting.
[00:10:24] Michael Chan: Yeah, so it's been- years of you actually educating and training people directly with React. And I'm I'm curious, you know, why why now? Right? Like so you have uh you've been doing all this kind of stuff. You've been training. You have you know a couple of products already you know that people can um you know learn React from you in certain ways. But I'm kind of curious, like you know why is now the best time for Epic React? And also, like how is it different from some of the other things that you've done? How have you learned from kind of all of these experiences? That you've had um training to like, you know, bring this like new epic React thing to life?
[00:11:03] Kent C. Dodds: Yeah, that's such a great question. So, like, um I I have the beginner's guide to React on egghead. I have um advanced React patterns on egghead. Um I have refactoring to hooks on egghead. So, I I could just like make a website that's like, all right, take this course and then take this course and then take this course and then, you know, whatever. Um so, Yeah, the the reason now is the time is because I feel like now should have been like years ago. Um, I the the cool thing about Epic React is just like with uh testing JavaScript, um I'm planning on keeping it fresh and updated over you know the course of the the years as long as um that's useful, uh and as long as I'm into it, which is probably for a long time. So the the benefit of uh doing Epic React on top of, like, or instead of just making a website that says, "Go take these courses," is because it really brings everything together in a nice way to weave people through in a process that I think will be more effective for their learning- yeah, their learning process. And also, Epic React is, like, vastly different from any other type of recorded instructional material I've ever made. It might be like a little bit more uh similar to Frontend Masters in some ways because it is like more of a workshop-based type thing, but even then it's it's still quite a bit different. One of the things that I really try to do as part of um effective teaching is to make sure that I'm not wasting people's time. Uh I don't mind taking people's time, but I I I want to take that and turn it into something and give it back to them in the form of just beautiful amount of knowledge. And um and if I you know take more than I give back, then that's not a fair trade, right? So I um with Epic React, I've really tried hard to make sure that um I can give you something really quickly um that you can apply in your day job. So anyway, it is different from Egghead, which is like very much that way. Just like jump into it, let me go through it. Okay, now What, what do I do next? Like, whereas with Epic React, it's like, okay, so here here's the problem that we're trying to solve, go and solve it. Um, and I I give you a very clear step-by-step process to accomplish that with uh documentation on like, here here are the things that you're gonna need to go look at, and I expect you to, uh you know, click on links and and go Google things and everything like you're at a regular job. Um, you know, this is practice. This is like what we do for reals. And so, yeah, here's here's what we're actually uh trying to accomplish, uh the problem that you're trying to solve. I'll kind of walk you through it in code comments and stuff, and then when you're done, when your brain is in the right headspace to learn this stuff, then you come and watch me do it. Um and this is this is the key difference from the like anything else that I've seen.
[00:14:01] Michael Chan: Yeah.
[00:14:02] Kent C. Dodds: Is it's just like, all right, um like I'll I'll briefly describe the problem and I'll go. Excuse me, and I'll go ahead and and solve it, uh and now you know what I know, right? That's how that works. But that's that's not how that works, because I may be able to explain the problem to you, but if you haven't struggled even just a little bit with trying to solve that problem yourself, you won't understand the solution nearly as well. And so I say, okay, here's the problem, now stop, and it's a completely different video to watch the solution. Right here, I want you to to go to the repo, you're you're running it yourself, you've got tests running to verify you got things right, you have the app and go and solve this problem. And I don't care if you finish, that's not what's important. What's important is that you've you've struggled with the problem a little bit so that when you see me do it, all the light bulbs start going off. Yeah. And this is all based on my experience in in teaching these workshops in person for the last several years where I've realized that the more that I get people to struggle, the more the light bulbs will will start going off.
[00:15:06] Michael Chan: I think that struggle phase is so important. I, I know for me personally, you know, I can- I've had those moments where like I read through a whole book on a topic and then I'm like, cool, well, I must be like a Rails developer because I read that whole book and like it made sense, right? Yeah. And then you go to sit down and actually do the work and it's like, uh, like, where do I start again? Like, what was the- I know it was kind of like this or like whatever. And like because you didn't struggle like for that information, it was kind of like your your brain didn't necessarily think it was valuable. It was like, oh yeah, like, you know, well, that's that's in this book if we ever need it again.
[00:15:43] Kent C. Dodds: Yeah, yeah. So, that's that's actually the that's the whole point is, um, that book turns into reference material, which is great. Like you can you can go back, but you don't actually learn it until you're struggling with it and then you reference that. So, like we we're doing things backwards where, like, I mean, it's not entirely bad. Like you're exposing yourself to what's possible. Sure. So, you run into a problem, you're like, "Oh yeah, I read like this problem can be solved." So, you go reference it. But if we can- this is all part of speeding up that process of consuming this information and getting it, right? Is like we just tighten that loop where we say, "Okay, so here's the problem. Now, I'm gonna give you an opportunity to struggle with that problem and then I'll give you the reference material so that you can get an idea." And and that is what locks it in place in your brain. It's like, "Okay, now I've I've struggled with that problem. And I've filled that gap in my brain with with that information.
[00:16:34] Michael Chan: I love that. I love that you've built the course around that. Um, 'cause I know that that's gonna make it more meaningful for people. And I think that, you know, it's it's one thing to just tell people how to do stuff, but like, I I I really have admired your approach in kind of creating that friction, just enough friction so that people actually can learn something. And it's a delicate balance, um, but it sounds like this is kind of your your your masterwork in like, at least trying to achieve that with people, um, you know, when you're not like in the room with them.
[00:17:06] Kent C. Dodds: Yeah, yep, exactly. And, and, um, I don't know if this is when you wanted to get into learning clubs, but that's- I feel like this is a pretty good segue where I'm not in the room, but maybe we can, we can help, um, pair people up for that.
[00:17:21] Michael Chan: Yeah, absolutely. So, so this is something that's totally new for, for, for you. Um, I don't think I've ever seen this from you before, but you're, you're working to kind of help groups of people go through this material together, kind of like a, you know, a book club. Um, but instead of having to like, you know, five, you know, find five friends to go through this, like you're actually gonna kind of like create an environment where people can find like-minded people to go through this material, um, together. Is that kind of the understanding?
[00:17:50] Kent C. Dodds: Yeah, precisely. So it's, it's actually pretty simple. Um, the idea is Discord is amazing. Uh, it's the next Twitter or something, I don't know. It's uh, but I love this as a social network platform. But um, Discord allows you the ability to to make like a mini server, um, where it's you and a group of 10 other people can be in a server. You have like video capability and everything. Um, and so, um, I I'm leveraging that capability and and my own Discord server to connect people who want to learn the same thing, not necessarily KCD stuff, but um often it it will be naturally because it's um because I'm doing it. But uh but yeah, just they want to learn the same thing, um and so they they come together uh on the KCD Discord and then they create their own little group uh where they they learn it together. And and we know— uh this this is based on, you know, research that has been done and also my own anecdotal evidence where I noticed that- Um, people will learn more when they're learning in a group where, like in my workshops, they're talking with each other, they're answering and asking each other questions. Um, and I I was looking at Testing JavaScript and seeing these people, and some of them would be like kind of active on our community forums and stuff. But um, a lot most of them are just kind of sitting in their basement, pulling up their screen and watching me go through this stuff. And they're learning tons. Like I've gotten so much like good feedback about this, but I'm just thinking there we can do better. Like there's something better for people here. And um and so I thought maybe like you can be in that same environment, but actually be accountable to a couple of people. That that accountability is is what's key with the learning clubs.
[00:19:37] Michael Chan: That's interesting. I feel like as an industry, we're really transitioning into trying to figure out what virtual learning environments or virtual social environments look like. Because that is something that you really can't, you know, when you're doing the online or in-person thing, you know, you naturally kind of like create these little like groups of the people you're surrounded with, right? Because someone groans and you're like, yeah, I don't understand it either. Like, can you believe this? Like, why is it so hard? And like, you you kind of group up into these um these relationships and like, you know, if you kind of get overwhelmed or bored, like you're not just gonna like peace out because like, you know, the person next to you is kind of struggling just as much as you and you're helping each other out. Yeah. Mm-hmm. And I love this notion of kind of bringing that piece of the live in-person thing into a like virtual workspace. Like kind of narrowing the focus a little bit so that you have like a handful of people working together and asking each other questions instead of kind of that nervousness of raising your hand in like a group of like 100 people or like asking a question that got asked like 2 months ago and then someone just slapping you with a link and be like, hey, maybe you should read the full history of this general chat log before asking a question.
[00:20:51] Kent C. Dodds: For real, like, I actually feel guilty sometimes when people ask me a question and I just give them a link to my blog. It's like, maybe you should have just read my entire blog. Uh, yeah, absolutely. I I think, um, when when you just, um, ask a question in a Discord channel that has, you know, 4,000 people in it, um,
[00:21:12] Michael Chan: Yeah.
[00:21:12] Kent C. Dodds: Then, yeah, there are helpful people who will be there and and you know and and try to help, but when there are 4,000 people in there, those helpful people can get kind of like tired, you know.
[00:21:22] Michael Chan: Yeah, yeah.
[00:21:23] Kent C. Dodds: And and especially when that helpful person is myself, I I can relate to myself very well and I get tired. Um, and so, by by grouping people into these groups of 10, none of them has to be an expert on any of this. Um, we we have the club captain and that's just the person who put it together and they just make sure the meetings happen. Um, the meetings don't even have to happen, like you can just do it all asynchronously, but we- the important thing is that you're in a smaller group and you get to know each other, and if they're like- you bounce off, you know, the like quote-unquote easy questions off of each other, and you struggle through it together, and then if there's anything that is just beyond any of your pay grade, then you can, you know, upgrade to to the bigger community, and and then like the bigger community community can help you out. And I also um I am doing these office hours where every Monday and Thursday I'm just available to anybody for an hour. Uh and so like you just come join a Zoom chat. Um they're all recorded, uh streamed on YouTube. And uh I just will answer any question. So like you're in a learning club, um and you you know bounce around some ideas but you're stuck, then come bring it to me. Screen share, show me the code that you're you're questioning. Like. Nice. People are already doing this and it's been awesome. So, um, yeah, these this learning club, I think that if you're gonna take Epic React Dev, you're gonna be blown away by how much you learn and how effective it is at helping you remember stuff. But if you do it with a learning club, then you will be blown away and you will have 9 other friends who are also blown away with you. And uh and maybe you'll start a company together or something, I don't know. But uh like already We only have a couple of learning clubs. Epic React isn't released yet. So they're doing other things. And already people are telling me that this has just been a game changer for their, their learning and retention. So I'm really, I'm happy with this. This is a good thing.
[00:23:15] Michael Chan: That's awesome. Now I want to, you know, with, with as much material as you've covered in your career, I'm curious what the like parameters are for Epic React. Like what does someone need to know coming into Epic React and what can they expect to know once they leave, if they've kind of gone through the material the way that you expect them to?
[00:23:34] Kent C. Dodds: Great question, yeah. So, Epic React makes the assumption that you have some experience with HTML, CSS, and JavaScript. We don't do a whole lot with HTML and CSS, so if your experience there is not super great, then, like, we're not, you're not gonna see anything that's gonna blow your mind, or or or I mean, that's going to be an inhibitor to your learning experience.
[00:23:57] Michael Chan: Sure.
[00:23:58] Kent C. Dodds: It's the the JavaScript part, you will want to to come in with a little bit of experience with JavaScript. And I have a blog post that that shows all of the features that I typically use when I'm uh using React. It's the uh called JavaScript to Know for React. And so if you're comfortable with those features, then um then you're golden. Uh if you're not, then I actually have a a free workshop that I did a few years ago that was recorded. Uh I did it at PayPal, and um and you can go through that workshop uh and kind of brush yourself up on on some of the more um recent features of of JavaScript. So, um, yeah, that's the parameters going in. You you need zero experience with React, or you can have like lots of experience with React. Um, either one will learn things. Um, so, but uh yeah, that's all that you need going in. Maybe some experience with Git, because we are working with Git a little bit, um, in getting different branches and stuff. So just like a tiny little bit of experience. You you could use uh like a an installed app uh to manage that too. But uh yeah, then from there, uh on the on the outside, like the the things that you will learn when you're all done, uh like, how much time you got? Um so- There's so much. Um so the the I'll I'll just actually read through the different workshops. So we have these modules that are uh self-paced workshops all on their own. Um, which when I give them in person or or remotely, like I have been more recently, um, these are about 5 to 6 hour workshops each. Uh, so we have React Fundamentals, React Hooks, Advanced React Hooks, Advanced React Patterns, React Performance, Testing React Apps, React Suspense, and then Build an Epic React App, which is actually 4 workshops by itself. So that's 11 workshops of of just like zero to hero material. And and actually, um, I'm planning on adding more stuff. So, we'll probably get some animation stuff in there eventually. We'll probably get some accessibility stuff um in there eventually. So, like, this is not the end. This is— you know, you haven't even seen my true form. Like, you know, like, uh, so, like, there is an enormous wealth of of material in here um that I'm just so excited for people. Cool.
[00:26:17] Michael Chan: Nice, nice. So, I love that. You don't have to be an expert to like jump in. This isn't like an advanced thing. But you can kind of like go in and kind of like evaluate the work- the individual workshops and then kind of like jump in where you feel like you need to augment your your learning or whatnot.
[00:26:33] Kent C. Dodds: Yeah. And, you know, I think people will be surprised at how— uh like if you're an experienced developer coming in, you'll probably think, oh, I'll skip a couple rungs of the ladder. I think you'll be surprised how many of those rungs actually would have been a good idea to to step on there. Um and and if you really are- this is actually this is kind of funny. So, um with my kids, I tell them, hey, you need to go clean your room. They say, um well, I I cleaned it yesterday, and or like it's almost clean. And I'll say, well, great, then it won't take that long. So, if you really think you are like just solid rockstar React developer, then great, it won't take you that long to go through this stuff. Um, but I do recommend that you go through it because interestingly, um, even with my beginner's guide to React, I'll have people who are like, I've been doing React for 4 years and I learned so much from that like beginner's stuff. Yeah. So yeah, I wouldn't recommend people skip a whole lot. Uh, just go through it, um, and if you already know it all, then you'll go through it really fast, um, but it you'll probably learn some stuff. That you didn't know before.
[00:27:35] Michael Chan: Yeah, I I always find it really interesting how your environment can kind of restrict you from uh like a level of learning, right? And so, so, one of the reasons that it's nice to actually like sit down with like an expert and like I I I've noticed this in in any times like I do trainings or like whatever, it's like I've sat in so many like apps or like codebases at this point that it's like you you start to get like a sixth sense of like how something is going to break or like how something is going to like be abused over the course of the next 6 months as people start to like pile on and whatnot. And um a lot of that stuff kind of comes out in those lower level funda- fundamental kind of concepts, right? You know, so you you're teaching this thing and you'll say like, ah, like I don't like to do it this way because X, Y, and Z. And so you end up learning, you know, kind of a a a better practice like built from you know, like years of experience as opposed to kind of what looks nicer, you know, for a linter or something.
[00:28:37] Kent C. Dodds: Yeah. Oh my goodness. For real. Like what looks nicer for a linter. Oh goodness. So yeah, like the, um, uh, often when we learn something new, um, I think that most people just want to ship stuff and I don't blame them at all. In fact, I would suggest most of the time when you're learning something new, try to get as fast to shipping as possible. Yeah. Because you're like, your your emotional investment in this thing is just begging for you to ship something. And if if you don't get there quickly enough, then you just can't you can't make it. You won't make it and you'll just give up. So, I yeah, when you're learning something new, brand new, you're just getting started, then get to shipping something as fast as possible. But The the bad side of that, or the unfortunate end of that, is that to get something shipped as fast as possible, you have to skip over some stuff. And um and so, very often, we'll skip over the fundamentals and then um all of a sudden, we're just we find ourselves appeasing a linter. And the rule about like, you know, well, the order of the properties in your objects is just as important as, you know, don't ignore or or uh don't skip out on dependencies in your useEffect array. As far as your editor is concerned, those are equal importance. And if you don't understand like the intricacies behind these things, or the the fundamentals, then you don't know that it's a a bad idea to ignore the the one about effective dependencies, but it like you should probably just delete that object property order uh rule.
[00:30:10] Michael Chan: That's interesting. I hadn't I I don't think I'd really ever verbalized the way that linters have a way of putting those two things that are very have very different outcomes if you get them wrong. Onto the same category, right? Like it's just a it's just a line item on things that you you're supposed to fix.
[00:30:27] Kent C. Dodds: Mm-hmm. Yeah, exactly. And honestly, I hadn't thought about it that way either until just this conversation, but but it it's totally true. And so the this is why I think a lot of people come to me after my beginner's guide and say, I learned so much, um because they they skipped over stuff. And I don't blame anybody. You should, like I said, uh you should skip over stuff. Just get something shipped. But uh if you really wanna level up, you've gotta go back and do those fundamentals. If you can't look at JSX and understand what that actually means in JavaScript, that you're making a function call and that you're passing an argument, um then you won't be as effective at using it. Um I I gave a talk at React Summit uh last year, and I gave an example in that talk about how um I I had this uh this faucet, our our kitchen faucet, has like the the neck that you can pull out and direct the water wherever you want.
[00:31:19] Michael Chan: Mm-hmm.
[00:31:20] Kent C. Dodds: And it wasn't going back. It wasn't retracting back into the neck. And I was like, what the heck? And we called a plumber to come and take a look at it. And then the day that the plumber was coming, like a couple hours before they came, I was like, I wonder like how this works. So I I look under and there's a weight that's on the bottom there that will pull it down. And it had just been twisted up in itself. And so that's why. And so I untwisted it and it went right back in. And I was so glad that the plumber didn't show up and like untwist that thing and say, here's your $50 bill or whatever for me untwisting this thing. So yeah, like, you know, dive in a little bit, get an understanding of those fundamentals, how that works, and you'll be way more effective at using it and save yourself a lot of pain and stress.
[00:32:00] Michael Chan: Yeah, it's interesting. I feel like this is something that we hate doing for some reason as like, you know, knowledge workers. I'm putting my like fingers up, you know, for anyone who's listening to this. You know, we're doing this live today on YouTube. YouTube. Um, but um, like, knowledge workers hate focusing on the fundamentals for some reason. But like, if you look at like professional athletes or like professional artists or musicians, like so many times it's like they're just like repeatedly doing the basics so that they can perform at like a higher a higher level when it's like game time, right? You know, you're just, you go out and you hit like 100 golf balls every day or like throw 100 like free throws. And that's something that I feel like a lot of times we just, we're like, we learn once, like, oh, this is what a component looks like. And then you like, you're like, okay, cool. Like I'm done. Like what's the, what's the next more harder problem that's, you know, gonna satisfy my, my intellectualism.
[00:32:53] Kent C. Dodds: You know, what's interesting about this is that it's not just the easy stuff that where there are fundamentals either, right? So there, there are more advanced stuff. And the, the way that I approach teaching all of this is um I teach in isolation, uh and and you learn it in isolation, and then you learn it again in a practical, real-world setting. And so, like, for example, uh React.memo or React.useMemo or React useCallback, um or uh useLayoutEffect, these aren't really um what I would term um the basics or beginner material.
[00:33:27] Michael Chan: Yeah.
[00:33:27] Kent C. Dodds: And they're not in the beginner material, they're in the more advanced stuff. But they do have fundamental uh principles that you need to learn, um if you want to be able to use these things effectively. Uh you know, if you wanna be the one who's just slapping on useCallback and useEffect and or and uh useMemo and React.memo on everything, then sure, go for it. Your app will probably be slower, uh and you probably won't reap the benefits of those APIs anyway. Uh and so, like without having an understanding of of those fundamentals, that while they are advanced topics, If you don't have an understanding of those fundamentals, then you're not gonna be able to use it very effectively either. And so that's why I teach in like these workshops and isolated examples, like totally all that you care about is just one API, and so yes, it's gonna be a little contrived, but then I make up for that contrivedness by then later teaching you, okay, so now we're in a real application and we've got this actual use case for the thing that we learned in isolation. So let's see what it looks like in a real an actual, uh, use case.
[00:34:29] Michael Chan: Yeah, yeah, yeah. I'm excited for people to kind of like, you know, anytime there's new material out there, I'm excited for people to like almost like speedrun it, right? Like, and like see all that kind of stuff. I like- it's so funny, like, I, I have never been into video games my entire life, right? But, um, just like during quarantine, I kind of got obsessed with Destiny and I, it, you know, it's, it's really interesting. Like, you know, there are things that people, like, once you have like, kind of like gotten basic knowledge about a thing, you'll kind of like, just like speed run it to like, kind of like make sure that you know all like the ins and outs and like make sure that like you still got that like kind of like under your belt. And I like the idea of like maybe like doing that with a course. Like it's like, okay, like I'm pretty sure like I got the, got the basics, but like, I'm sure that there's probably something in here for me anyway. Like I feel that way about Vim Tutor. It's like, no matter how many times I do that. It's like I learn something new every time. There's some additional option that I'm like, oh, sweet. Well, that was worth like going through it again.
[00:35:28] Kent C. Dodds: Yeah, absolutely. I think this is really anything instructional. Um, you're, you just, it's very unlikely that you know everything uh about, you know, these things that, that you're going to learn. Um, and so like, and especially, um, the fact that we all are different people with different experiences and, and have hit different problems. Maybe lots of shared space there, but there there are definitely edge cases and things like that. Um, it's kind of funny to think of somebody trying to speedrun Epic React because it'll just take you so long. Uh, so like, even if you just watch the videos and you watch them at 3x, I haven't added up all the time yet, but there are over 300 videos at an average of around like 5 minutes each. So like, that's gonna be a very, very long week or two, uh, if even if you just watched it like 3x. On all those videos. Uh, if you do it right and you're actually doing the exercises, Epic React is is really- I don't like- uh, it's basically a boot camp, um, is what it is. Like, this is a- for for many people doing it right, if you have no experience with React, you're just getting started, this is gonna take you like 6 months to go through all of this stuff. And then you're gonna use this for for reference material later. Like-
[00:36:45] Michael Chan: Awesome.
[00:36:46] Kent C. Dodds: You you do this right with a with a club and you go through each thing very methodically, and you you go through and building the app as well and maybe building your own app to solidify things, this is um yeah, this is enough curriculum to keep you busy for a really long time. So, good luck speedrunning it.
[00:37:04] Michael Chan: Now, I want to ask a question that may sound a little bit ridiculous for this show in particular, but I guess maybe even specifically like being a conversation between us, but you know, at this point, Like why React, right? I know that you have been in previous technologies before and you kind of came to React, but it's really stuck. And I'm curious, you know, for the person who's thinking about, you know, Epic React, you know, putting their, putting their money in and time on Epic React versus like whatever the like Epic Vue or like Epic Ember or Epic Angular like equivalent is like, why, why React?
[00:37:44] Kent C. Dodds: Yeah, um, so I actually just last week wrote a blog post, um, on Epic React, uh, called Why I Love React. Um, and so yeah, this is this is top of mind for me. Um, and like the the quick answer is I like React because it's simple. And like I I need to mention this, 'cause like people get super mad at me when I say this. Like they're like, well, what about Svelte? Or something, you know, like Svelte is awesome, like don't get me wrong, I think it's great. Vue is cool, like this is great. I'm not comparing these things. Um, but React is simple, um, in by the definition that it's not complex. Uh, so, like, easy and simple are different words, totally different words. Easy means that, like, it's um, it's retrievable, like it's it's something that's near or similar to something you've already experienced. It's familiar. React is not familiar for most people. Um, you know, you jump into React and It's like, wow, we've got markup in my JavaScript, what I just threw up in my mouth. Like, that was my experience. Um, but after 5 minutes of using it, um, I was like, this is the next thing for me. Um, I and I'd been using AngularJS for many years. I I was a core contributor. I was like doing podcasts with AngularJS. I did 5 minutes, I I I worked with React for 5 minutes and I was like, yep, this is it. I I can't believe, like, I I found it. This is great. And so, um, like some of the things that make it really simple for me, um, or or that I think make React objectively simple is that, um, the state management solution- like I know that people love hating on React state, how like, and and actually today there's like a bunch of stuff going on on Twitter about how like React state management and the mess that it's in. But I actually don't think that, um, React state management is complex. The things that people complain about are everything else they try to do outside of React to manage their state. React by itself manages state really simply. You have some state, you have a mechanism for updating that state, and anytime you want to update it, you you just call that function with the new state, and that's it. And you you get a re-render, you you don't think about time at all. Time doesn't enter it. You have this function that runs anytime that state updates. So, like, fundamentally, it's simple. Now, it's not easy. Like, building applications is not easy. That's different. It is it is simple. Um, I also, like, really fell in love with React, um, using JSX over templates. Um, when I was doing AngularJS, I actually uh built Angular Formly, this really popular forms library. I think it's probably still the most popular forms- it will probably always be the most popular forms library for AngularJS. Um. But uh lots of it was actually trying to move as much as we possibly could into JavaScript. Uh because JavaScript is an actual programming language. Um whereas with a template language, you have to build um a bunch of features into this thing.
[00:40:38] Michael Chan: Yeah.
[00:40:38] Kent C. Dodds: And that thing is all like, you know, like if you wanted to take the knowledge that you build learning this template language and transfer it anywhere, it's totally useless. That knowledge is gone. Uh JSX, it does take a little bit of time to to learn how JSX converts into React.createElement, but once you you build that bridge in your mind between JSX and React.createElement, which you'll learn from Epic React or even the beginner's guide, which is free, so like if somebody wants to try that out. Um once you build that bridge, then it's all JavaScript from there. Um and so you can see JSX as JavaScript. Um and so the more you invest into JSX and into React, the more you're investing in yourself as a JavaScript engineer, and you can transfer that anywhere, even to the backend. So I I loved that, and and it was just such a shame for me to switch from AngularJS uh to React just because I knew there was so much that I was just saying goodbye to forever. So much that I'd invested, uh it was really frustrating. And and I know a lot of people got really fed up with Angular 2 because it was such a big um switch from Angular 1 to Angular 2, there was like, well, I invested all this stuff and now it's all gone and I'm staying with the same framework. Like that that was frustrating for a lot of people. It was frustrating for me. Uh and then React hooks also, I think this was just an explosion. You know, this wasn't as I was first getting into uh React, like it it didn't have hooks, but when hooks came out, it just increased the, you know, turned the knob up to infinity on simplicity. Okay, maybe not infinity, but it just like really notch things up on on simplicity, because now, if I wanted to share some logic, I don't have to do some weird, like learn some weird um pattern that's React-specific, like render props or higher-order components. Like, I don't have to do that. I just say, I've got some logic and I wanna use it over here, so I'm gonna turn that into a function and I'm gonna call it in both places. And that's how that's how you do everything with JavaScript, like any programming language. You're like, I've got some logic, I'll just put that into a function, pass some arguments, accept some stuff when it comes back, and and that's how I uh share logic. So hooks, uh and then like just in general, switching from component life cycles to useEffect where it's now, I have some state in my React app, I have some state in the rest of the world, I need to get these two things in sync, that's useEffect. That's all that useEffect is, synchronize the state of the world with the state of my app. And if they're out of sync, then I put a useEffect, make that useEffect put those things in sync. Um, and so, yeah, maybe it's not easy, but it's simple. And simple is what builds maintainable applications.
[00:43:18] Michael Chan: Yeah.
[00:43:19] Kent C. Dodds: Easy doesn't do that. Easy can't build maintainable applications, but simple can. And that is what gets me super excited about React. And then there's also like the fun stuff that I I I haven't taken advantage of, but like I can build things on native, I can build things in the terminal, I can build things with 3D, I can build like anything you can imagine, VR, all of this with just everything that I know about React. So, React nailed it. They just nailed it with the component model. And so, that's why that's why React for me.
[00:43:50] Michael Chan: I love that answer. It's funny because it's so hard, man, it's so hard to describe that without doing it from experience. Right? And so, like, that's- like, it's one of those things. It's like an unanswerable question, I think, sometimes for for people who are like brand new to it. But like, you know, I know for us, like, we we came from different frameworks. And it was an immediate, like, a lightbulb moment for us because we were like, yes. Like, I am so tired of, you know, everybody arguing about which API does or doesn't belong inside of a template. Templating language when like I have JavaScript, like I have it already. Like I have a language to do all this stuff. Like, why do we need to reinvent it in this thing? That's like just supposed to like spit that value out in front of, in between H1 tags. Like, why did we do this to ourselves?
[00:44:39] Kent C. Dodds: Yeah. Yeah. Yeah. And, and you know, like there's an aspect of that that's like, well, okay. So that's just a familiarity thing. You get yourself familiar with the, with the template language, then, then that's fine. And I can go with that. But I really like the idea of just being able to be like, I'm just gonna get sick good at JavaScript and then I'll be able to do anything that I want to. And I guess there's another thing that that I really love about React now that wasn't the case back then when I when I first got into React. But it's the the size of the community and the the just like— so I love the community for the people that are in it. Um, we have just a silly number of awesome people in the community. And unfortunately, because the size of it, it's just enormous. We also have lots of not awesome people in the community. We can't really help that. Uh, there's not like a vetting process to get in the community. But, um, although there is a vetting process to get into the KCD Discord. So there's- enjoy that conversation with the bot.
[00:45:38] Michael Chan: You fixed the one problem that you had with React.
[00:45:42] Kent C. Dodds: Yeah, but um, but yeah, so, be um, because of the enormity of the size of the community, um, paired with the fact that React, the React team has decided to forego what frameworks typically try to solve, uh, you know, by building everything in. Like, we've got our HTTP library, animations, like, they they just, we're not gonna do that. So, that that just creates this really big hole of missing things, which you might look at that and be like, well, that sounds like a bad thing. Um, like, I want to just have all my answers. But the cool thing is that because there's that huge hole of problem that needs to be solved, rather than having a small team at Facebook solving all these problems for us and just assuming they know what's best, we instead have this enormous community of millions of developers solving all of these problems in different ways and coming up with different solutions. And there's no one end-all be-all because the community is just so large that not everybody has the exact same problem. And so what that means is you come into this community now and it is very unlikely you're going to face a problem somebody else hasn't already faced and solved. Whereas with a either a smaller community and/or a dedicated team that solves all of the problems, if they didn't solve it in the way that you like, You're probably not gonna try and build it yourself because this is the blessed solution. And so, uh I'm not gonna try and and face what, you know, or beat the blessed solution here. Like instead, I'm I'm just gonna work around the the like blessed sol blessed uh sol solution here. And so, uh then you have you don't have as much innovation in that kind of a a world. And so, I'm I'm glad that React decided to just go whole, like 100% dedicated to solving this problem really, really well, the component model. And then they left it to the enormous community to solve all the other ones and, and just like so much innovation has taken place because of that. And that's another thing that I love about React.
[00:47:48] Michael Chan: Yeah. Well, hey, I want to uh just kind of wrap up and just know where do we send people? And like, if this sounds good to people, and I think that you've just been such a tremendous um educator for, for React. React and talking about all the things that really empower people to solve their own problems with React, which, as you mentioned, is simple but not easy. You know, it requires a lot of handholding as you kind of go go into some of these these concepts. If this sounds like the way place that people want to uh learn React, uh how do they do that? Where do they go?
[00:48:24] Kent C. Dodds: Well, I would welcome you to go to epicreact.dev. And it's it's pretty likely that when you're listening to this, you will actually be able to grab yourself a license. Um, so that's exciting. Uh, I'll mention while while we're here, uh, that the pricing is still not uh uh like solidified yet, but I'll I'll mention 3 things about it. One, it will be absolutely worth it. Um, and two, there will be an enormous sale when this is launched. So if you have the fortune of listening to this during the launch time, then go get it right now, because there will be a big sale. And then 3, we do have uh purchase power parity, which basically means if uh like the dollar is worth a different amount of money depending on where you are in the world. And so uh there will be a special uh link for you to opt into that, um so you can get like an enormous discount. We we do this on Testing JavaScript. Some people get like upwards of 80% discounts um on on things. So like It is uh a non-trivial discount. Um so anyway, um go to epicreact.dev. If if it's not launched yet for you, then uh just scroll down to the bottom, give me your name and email, and I will let you know uh so you don't miss it. And then um don't miss the KCD Discord as well. You can find that at kcd.im/discord. Um and we have an awesome community there. That's where you can find the uh different learning clubs that are actively accepting new members. And where you can learn to create your own learning club. Um, and actually you can learn more about that at kcd.im/clubs. Um, and like really actually learn this stuff. Uh, that's what I I want you to do. That's what the clubs are for. And uh, yeah, I'm just so excited for this. So, I I'm gonna stop talking so it can happen.
[00:50:08] Michael Chan: Yeah. Well, and I think I one last thing I wanted to touch on is is that I love the— I know that you and I both believe this, but like the the best way to learn something is through teaching. And I know a lot of times people don't have a, you know, an avenue or know how to start in that like teaching thing. And I think that Clubs is a really interesting idea because you can kind of slowly grow into that. You go through the material and you're like, okay, I know this, like I could lead someone else through this. And then um kind of grow from there and you start like kind of like writing your blog posts and then like before you know it, you're the next uh Kent C. Dodds.
[00:50:42] Kent C. Dodds: Yeah, yeah. I I need somebody to be the next Kent C. Dodds. Just kidding.
[00:50:48] Michael Chan: All this time you've been trying to duplicate yourself, so it's time for those Kent C. Doddses to rise up.
[00:50:55] Kent C. Dodds: Oh, but for real, like, I I really— uh I know that it sounds like— uh I don't know if platitude is the right word, but like the the whole I want to make the world a better place thing, but I really do. And and the more people who are um helping me with that, the better. And so I want uh I want people to really get this stuff. And I want them to teach it to other people as they as they go along. So, absolutely, I welcome anybody going through this material to um you know to write blog posts about what you learn. That would be super awesome. I mean, give credit where it's due. Um you know say, "I learned this from this course," and that's that's it. I don't need it to be like huge or anything, but um you know it's just it's a really good opportunity for you to reinstate in your mind what you actually learned. And that's actually one thing that as you go through every single one of these exercises, I give you an opportunity to write down the things that you learned. Because this is so much of- sorry to keep this going, but it's like so much of what Epic React is all about is trying to solidify in your mind the things that you've learned. Otherwise, it's a waste for both of us. And so, um, one of the things, like a lot of the structure behind Epic React and the workshops and the exercises And like forcing you to work through the problem first. A lot of this comes from the book "Make It Stick" and the research that was done in that book. Um and uh and uh reiterating what you've learned in your own words is one of the things that really helps to make it stick. So you'll find a lot of different things in Epic React that are just 100% there to ensure that you don't forget this stuff when you go to apply it and when you reach for it in your real-world app. Which hopefully will make the world a better place. So that's it.
[00:52:37] Michael Chan: Awesome. Well, that's a great place to uh end, Kent. Uh thanks so much for being on. Uh I hope that people check out what you're doing at uh epicreact.dev.
[00:52:47] Kent C. Dodds: Yeah. We got uh we got epicreactdev.com too, just in case.
[00:52:51] Michael Chan: Nice, nice, nice. Just remember epicreact.dev and you'll get there by some means.
[00:52:57] Kent C. Dodds: Yeah.
[00:52:58] Michael Chan: Cool. And then uh where can people follow your blog and uh yourself on Twitter?
[00:53:02] Kent C. Dodds: Yeah, so kentcdodds.com/blog is where my blog's at. I've got, I think, like 170 blog posts or something like that. Um, so plenty plenty of reading material. Probably write a book eventually. Um, and uh Twitter is @KentCDodds.
[00:53:16] Michael Chan: Awesome. Well, hey, thanks again for being on the show, Kent. Uh, can't wait to have you on again later when you you know do your next thing, or we can finally talk about testing JavaScript, which we've never done yet.
[00:53:28] Kent C. Dodds: That would be a cool thing. People seem to like it, and so do I, so I'd love to talk about it.
[00:53:33] Michael Chan: Cool. Well, hey, have a good one. I hope that the uh the launch is amazing for you and everyone who uh gets involved.
[00:53:40] Kent C. Dodds: Thank you so much, Michael. Appreciate it.
[00:53:42] Michael Chan: A transcript for this episode was sponsored by Kent C. Dodds. Thanks, Kent. To read this episode and find show notes, visit reactpodcast.com/112. This transcript might be a little It's a little delayed as it's not yet part of our post-production process, uh but we'll let you know on Twitter when it's live. Thanks to this week's sponsors, Imagix and Infinite Red. Unprocessed images kill performance. Imagix helps you deliver sharp, snappy images to customers with powerful image processing and a simple API delivered on a global CDN. Follow the lead of Unsplash, Kickstarter, and Prismic who use use imgix because they know the importance of image optimization to user experience. Get a $300 account credit at imgix.com/reactpodcast. That's imgix, I-M-G-I-X, .com/reactpodcast. Infinite Red have been designing, building, and shipping quality apps for 10 years and make their expertise and industry connections available to you. Infinite Red will give you seven $750 when you start or refer a new project. Get expert help from Infinite Red by visiting reactpodcast.infinite.red. If you like this show, there's a fast, free way to demonstrate your support. Leave us a review on iTunes. It's the best way for you to let me know what you think we're doing right and what we can improve. 2 to 3 minutes of your time helps us make the best show we As always, links and show notes for all episodes are available at reactpodcast.com. This episode was edited by Mikael Delport. It was produced by Mikael Delport and Sarah Jackson at Spec, a network to help you level up in design and development. Check out spec.fm for other shows that are sure to fast-track your career. I'm your friend, Chantastic. Thanks for listening. We'll be in your ears again next week.
chantastic.fm