Zac Gordon on Yoga, Teaching and React

In this week's episode, I'm delighted to welcome back Zac Gordon. If you spend any time in the WordPress world, you've probably come across Zac. He's a really enthusiastic and charming teacher who specializes in JavaScript for WordPress. He's done video classes, online conferences, live talks, podcasts, video casts, you name it. He's been out there trying to teach people how to use JavaScript, particularly in the WordPress context.

For the first time, Zac's written a book, and he did it with OSTraining. React Explained is available now, and it teaches you how to use the React framework, which is increasingly popular in WordPress, but also Drupal, Magento, and other platforms. We talk with Zac about his background, his love of yoga, and also about why he decided to focus on React for his first book.

Subscribe to the OSTraining podcast on iTunes, or use the podcast player below. We're also on Stitcher, Overcast, and other popular podcast apps.


Listen to the episode with Zac


Transcript of Zac's Episode

  • Steve: Hey, and welcome to the OSTraining podcast. I'm Steve Burge, and we talk with fascinating people from around the open source world for these podcasts. In this week's episode, I'm delighted to welcome back Zac Gordon. If you spend any time in the WordPress world, you've probably come across Zac. He's a really enthusiastic and charming teacher who specializes in JavaScript for WordPress. He's done video classes, online conferences, live talks, podcasts, video casts, you name it. He's been out there trying to teach people how to use JavaScript, particularly in the WordPress context. For the first time, he's written a book, and he did it with OSTraining. React Explained is available now, and it teaches you how to use the React framework, which is increasingly popular in WordPress, but also Drupal, Magento, and other platforms. We talk with Zac about his background, his love of yoga, and also about why he decided to focus on React for his first book.
  • Steve:Hey, and welcome, Zac.
  • Zac: Hey there, Steve.
  • Steve: Hey, so Zac, you were on the podcast before about six months ago when you started writing the React book. And, well, congratulations. The book is out.
  • Zac: Hey, thanks so much. That's right. It either seems like a long time ago or not at all, but here we are with it up on the web. Yeah. Ready to go in on Amazon. It's cool.
  • Steve: Well, six months is warp speed when it comes to writing books. You practically flew through it.
  • Zac: I have no context. I haven't done something just like this before, and you were really cool in letting me just kind of work an hour or two at a time, couple days a week whenever I had a chance. And yeah, we got there. It was a cool process.
  • Steve: Well, I started writing books for person, the big multinational 10 years or so ago, and I remember I just couldn't get my head around it at first, and some of the first books would take three to four years. I just really, really struggled, and I had a very understanding publisher. I remember at one point someone asked me when my deadline was, and I said something like July, and that was about February. They said, "Oh, you've got a few months left." I was like, "No, that was July two years ago." I had literally overrun my deadline for about two years, so six months is great. And I didn't realize this before, but although technically this is your first book, you've been writing about JavaScript for years and years, 12-13 years now.
  • Zac: Yeah. It's funny when you look back, and things at the time you're like, "Why am I doing this? Why am I putting in so much effort into this?" Like turned out in hindsight to build into and grow into other things. So when I was teaching JavaScript at like college level, wow, yeah, at least 10 years ago now, I didn't love all the textbooks on the web and things like that, so you were allowed to write your own books. So it isn't my first time writing about JavaScript, but in this kind of format and something that is in a textbook, or a guide in another way, yeah. The writing is not new. From school and just being an educator, you do a lot of writing. So I'm grateful to have had that skill. I think if I was just sitting at this without experience with that, it could have taken a while longer. But yeah.
  • Steve: So take me back quickly. You have one of those voices which is almost perfectly designed for training. We used to joke that we would always prefer to hire teachers from the Midwest, US or from Canada because they have that really smooth, almost accent-less English. Where are you from originally? What's your background?
  • Zac: Well, I'm from the Mid-Atlantic area, so that's not too far off, but Washington, DC. I can get a little bit of that Maryland drawl when when it happens and feeling homely, but yeah. It's funny you mentioned that. Y'all know Nick Pettit at Treehouse? I remember when I did my first like application video for them, I just copied him like, "Hi, I'm Zac." And I think that has just evolved from there, but it's funny you say that.
  • Steve: Oh, yeah. It's almost the perfect voice. We would always get people who complained about a British accent like mine, an Australian accent, a Southern, US accent. All of those accents would cause trouble for certain groups of people from around the world, from certain areas, whereas the accent that you have is almost perfectly designed to be understood by just about everyone. So you grew up in DC, and you were a teacher, am I right? You were originally not a JavaScript or web design teacher, but just a regular teacher teacher?
  • Zac: Yeah, so I've lived in DC, Maryland. I'm currently on the other side of the river in Virginia from DC. And Yeah, I've worked high school teacher, taught college, and some like bootcamp type environments, things like that, as well as the online stuff, and things like that. But yeah, I started off teaching. I thought I'd be in the classroom forever, and I might go back to it. I can still like get a little bit older, want to chill out a little bit, going back to the classroom, because it's a cool environment, and I really love that.
  • Zac: Originally, I think I wanted to like major in sustainable farming, and Sanskrit, and yoga studies, but I luckily had some good mentors that were like, "Look, if you're going to pay for an education, like get something practical that you could use, and teachers get summers off." And I was like, "Oh, okay. Maybe I'll just be a teacher." And honestly that's kind of ... It resonated in a lot of ways, going back to help people and feeling like we can make stuff more interesting. But yeah, that's kinda how that got going.
  • Steve: So if you didn't do yoga or Sanskrit studies, what did you actually teach when you walked in a high school classroom for the first time? Was it web design, or was it something completely unrelated?
  • Zac: Yeah, so I think I was already doing my master's in like technology curriculum development education with like that kind of niche, except I already had a degree and teaching credentials in history. So I started off teaching history with like one or two little tech classes or web design classes that I picked up from another teacher. And over time, I had to go back and do computer science credentials and stuff like that, which No Child Left Behind in the States requires that you have a degree in whatever you're teaching.
  • Zac: So that extended into education had to happen for me to go full-time into teaching like computer science and web development, and build up a four year web design, web development curriculum. Students had paid internships Their last year, got half the day off to like remotely run their business. It was a super fun, cool program. I really enjoyed it.
  • Steve: Oh, you want to hear an embarrassing story?
  • Zac: Oh, yeah.
  • Steve: So when I first moved to the States, I got married to my wife, I had to wait like three months for a green card, and literally fresh off the boat, didn't know much about America apart from what my wife had told me. And by the time my green card came in, I couldn't get a job. It was September, October, and the only place hiring as a teacher was this little school out in the countryside. And this was in the Atlanta area in Georgia. And okay, what kind of school is hiring for a teacher in October? Probably not the best school. And so it was the only job I could get because I had teaching qualification.
  • Steve: So I walked in, took the job, and first week on the job they told me, "Congratulations, here's your American history class. You're going to be teaching American history now." I knew nothing about it whatsoever. Literally every night I took the textbook home. "Okay, I'm teaching the Bill of Rights tomorrow. What's the Bill of Rights? Okay, I'm teaching the Constitution tomorrow," flip through the textbook quickly. "Hey, what's in the Constitution?" And to some extent it was great. It got me up to speed on American history and America pretty quickly, but I'm not sure the students learned too much.
  • Zac: That is funny. They say teachers just gotta be one chapter ahead of the students, right? But that is a rough experience, and never feels that great. But who's to say how much we remember from all of this over time? But that's really funny, man.
  • Steve: So you had a web design curriculum that you built up for your students over a good period of time, and it had real results, actually getting students into internships and real jobs?
  • Zac: Yeah, it definitely did. And it was a cool program. We bring community members into the schools, and they would work with the students and pay the school, and that would get filtered out. It was a really interesting, cool program. And competing with things like students working at McDonald's and Target, it felt kind of cool to give them these skills. And some of them, like I've stayed in touch with over the years, have ... like literally working in the field now doing this as their income. So it's kind of funny to see how that all starts.
  • Steve: Oh, that's probably the best thing about being a teacher, whether it's a regular teacher or a web design teacher, is the students coming back to you over the years. There's a guy, Topher DeRosia, who has worked with us doing WordPress teaching-
  • Zac: Love that guy.
  • Steve: ... for a good number of years now, and he just got a job as an evangelist for BigCommerce. And one of the changes he's had is going around to all the WordCamps, and he keeps on running into people now whose experience with OSTraining, with what we do, learning WordPress, and PHP, and other platforms, has got them a job and built them a career. Teaching doesn't pay that well, but that feedback you get from students years later after they've taken your courses and perhaps built a career out of it is probably the best thing about the job.
  • Zac: You know that's right, buddy.
  • Steve: So you had a successful web design curriculum. Why did you decide to quit being a teacher, or perhaps more positively, why did you decide to jump into a tech career?
  • Zac: Yeah, well, first of all, I have had a hard hustle since like 20 plus, if not earlier. So I was teaching high school full-time. I was teaching some college courses as an adjunct. I was running a web design agency that was pretty good, and had people working for it, and good client base, and recurring stuff, hosting company. And like I had a lot of stuff going on, so I never worked for a big company or worked in the field. I'd run my own freelance shop. I'd hired other devs, had built that, but I wanted to see what it's like to work for a huge company.
  • Zac: And I had a friend who was also a college teacher, who took on the UX lead at Blackboard. I don't know if y'all know this. This is like one of the Legacy LMS systems of the web. It's built in Java, and like they were building an integration, a social integration, and they had like a billion users. And I had an opportunity to do like straight UX design, like sketching and drawing, and like coding, CSS, and JavaScript and stuff. And it was a really exciting opportunity. I was also having my son around that time, and just felt like I wanted a change, do something different.
  • Zac: It was really hard to leave teaching the classroom, but I had done so much, and also pushed a lot of boundaries and limits both with them, like the school system and legally. And I wanted to impact bigger change. So I knew I wouldn't be leaving teaching forever, but I wanted to go do that. And I did that for a year and 12 days. I had a countdown timer and everything. I loved it, but CodeMonkey is not for me, but I learned what it was like to work in a huge company, work with teams, work on Legacy systems, huge systems and stuff. And I think that that's been super valuable for me.
  • Zac: But I got the opportunity to teach at Treehouse like almost a year in, and that just blew my mind because that was ... We can talk about different things, but yeah, that's kind of how I got into it. So nothing ever really felt out of line. It's just kind of things adapt and change. There's this saying that like we should always be willing to give up who we are for who we can become. And I kinda like that, and it was a bit of that. But it was hard because a lot of identity has been in teaching, so glad to be back in it now.
  • Steve: It's hard to find two companies that might be as different as Blackboard, which is such an old Legacy company with Legacy technology, and Treehouse, which is almost entirely on the cutting edge. Both education companies, but very, very different in their approach?
  • Zac: Oh, yeah, right? One is the young buck, the coolest tech. Like when Treehouse started, and I started there, they were like, "We're only teaching the cool stuff." And Blackboard was on such another level. So it was really fun, and a bright change, and a cool way to go back into teaching. Right? So I knew I wanted to go back into teaching. I was considering finishing a PhD program and trying to work a like four year web program in academia. I really like academia, and I just didn't feel I had enough push or pull to like leverage that.
  • Zac: I knew I didn't want to go back in the classroom, because a lot of like things at a federal or state mandated education stuff I was frustrated with, and wanted to impact change. So going into teaching online and reaching like off the bat, like I think the WordPress program built up to like tens and tens of thousands of students. It's like, "Okay, most impact and change, let's try this approach." So switching from academia into the online stuff was cool, and no one better. Treehouse is one of the coolest jobs I've had and really dig that company. It was a ton of fun, and huge publicity for me outside of academia. I was known in some circles, but definitely not the normal like bossy, teachery world. Right?
  • Steve: Well, I was about to ask about that. When you left Treehouse, you kind of took a brand with you to some extent, right? If you mention the name Zac in the WordPress world, you're almost like Ronaldo or Madonna. Basically, you're just known by one name by a lot of people. You have a very unique personal brand. Was that a decision that you made when you launched your own teaching career outside of Treehouse, to have a brand very heavy on graphic design and very heavy on on your personality? Or was it just kind of accidental? Those were the skills that you went into the work with and you just naturally happened to build it?
  • Zac: No, that has all been an evolution and pretty conscious and slow along the way, although on the web everything happens quickly. So my dad had a sewing machine repair shops/sell shop and school. He ran a pretty big school for the area, and I watched him run this mom and pop business and the difficulties he had if he wasn't there working it. So I learned and have always been interested in systems and companies that can run without my face or brand longer and bigger term, like web hosting for students. I don't touch a lot in it. It has a huge staff and team and operates, and that's cool. So-
  • Zac: ... originally I think it was like Web Devs or something. I had one name and then I up with "JavaScript for WP", and that was originally meant to be one product, a master course, and that was it. So I liked the idea of brands, and honestly, now my face is the brand for JavaScript for WP and much more out there. That happened as a joke of just wanting to put my face stickers on things, and kind of like took off. And so it was kind of like a joke experiment, but I think has worked well, and now I'm learning what it is to craft a personal brand where your face is the brand, and what it means to be beyond that, or on it, or ... It's all interesting. It's all really interesting what goes on today with content creation and all of these type of things, as a company of one type scenario.
  • Steve: Perhaps it's fair to say that it's something that resonated with people, that you try different things. You try different brand names, different approaches, different logos, mascots and whatever. And then sometimes you just find something that people latch onto, that people remember and talk to you about. We had a business in the the Joomla space for a good number of years that we retired, probably retired in like 2013, and it had a logo of a dog that a friend of mine in Atlanta had drawn. And for some reason, just the timing and the way the logo was drawn, it just really stuck in people's minds, and even several years later. It's probably the thing I'm best known for in some communities is running that site. They come up to me and say, "Hey, you're the dog person."
  • Steve: And I have a feeling with yourself that you just have a personality, an approach that resonates with people, that is the kind of thing that they remember and sticks with them. Is that what you found, that by putting yourself front and center and putting your personality front and center, that those projects are more successful, that people pay more attention to them?
  • Zac: Oh, Man. Well, first of all shucks and thanks. It's tricky to talk about yourself sometimes, but they have this saying of like, "If you want to know what your strengths are, ask people, or listen to people what they say." And they're like, "Oh, just like friendly and explain things well, and enjoy it." So have heard that as feedback, and then just try to work with that, and I don't know, kind of just being me, but at the same time being conscious of it and trying to ...
  • Zac: People might not realize, when you make a video or record a course, I feel like there's an audience of a hundred or thousand people in front of me, and I project and I put my energy in. So when I finished recording 5-10 videos, I'm pretty exhausted. I feel like I just came off of a stage and was really putting your heart and connecting with individuals. So there's a way of putting yourself into it, I think. Maybe that comes across, and I don't know. It's something I try to do. I'm curious if that has the effect or not, but ...
  • Steve: Yeah, I think it does. We were talking about the voice earlier, that you have an almost ideal voice for training. It's very clean and very neutral accent, but it sounds as if the personality side of putting yourself into the training, of being so energetic on screen is much more hard work. The voice comes naturally, but to be such a good teacher is a considerable effort every day, to be high energy, to try and transmit as much enthusiasm as possible to the students.
  • Zac: Yeah, and I think anybody in the field of talking all day has that experience too at some level.
  • Steve: Yeah. We have worked with a whole bunch of teachers over the years, and particularly the ones that do video training tend to find it really exhausting, that at one point in the past we tried to hire a full-time video trainer. And we experimented with it, and we found it would drive people nuts. The sheer amount of effort and energy of doing the video classes, and listening to yourself for 40 hours a week, was more than anyone wanted to do. They all found the need after a certain point to go away and do some projects or do something else. The video training is exhausting.
  • Zac: Yeah. I'll second that. It's funny you mentioned that. It's funny, some folks will be weird listening to themselves back, and I have to do that so often, and I'm always analyzing it and how to improve it. And it's like watching a playback in sports at your team, and you're like, "Okay, let's do this. Let's run it again. Run it again. Run ... " And I forget how accustomed I become to that. I'm like, "Oh, no, that's just my job now. Yeah, that's what you sound like. Yeah." But it's funny.
  • Steve: You've been in education for 15 years now, and kind of winded your way through being a high school teacher, a college teacher, working for Blackboard in the education space, working for Treehouse, getting your own JavaScript training brand up and running with videos, and the React book as well now. But we talked earlier, and you mentioned that the training skills were winding their way into other areas as well, that you're a yoga teacher too.
  • Zac: Yep. Yeah. A part of getting to know what the personal brand is how much of my actual personal self do I put into that personal brand? So the yoga is one of those that I'm beginning to experiment with being more public and branded around. But yeah, I've had a lot of experience with yoga and teaching in different environments, and practicing different branches, and it's a big part of my day to day life.
  • Steve: Does it help you cope with being stuck in a screen, working indoors all the time? Is it something you do for your health, something you do for relaxation off the screen? How does it fit into your work life balance?
  • Zac: Okay, cool. I'll give you the on brand and off brand answer to that. On brand, yes, I incorporate it in my daily life, and it really enhances my ability to focus, and be present, and deal with changes in situations. Right? That's the on brand answer to that. The off brand is real talk. I don't do yoga because I'm like a frou-frou person. I do it because if I don't, I suffer, and I do not like it. Like I have a lot of skating injuries, and being hard on my body over years, and who knows what else, and just struggling with life and how F-ed up it can be, and what a hustle it has to be sometimes, and things are tough.
  • Zac: So I do it, and I can't go more than three days without tuning in and ... Now mind you, there's also exercise, and there's tons of modality, martial arts, tons of different things, dance. Everybody I think gravitates toward different things. And I explore, and I like a lot of different modalities, but yoga has been one for one reason or another that's always been there and keeps evolving.
  • Steve: So people can actually log onto zacgordon.com and join one of your yoga classes?
  • Zac: So on zacgordon.com I have a yoga page, and I link off to a site that I've set up called officeyoga.tv. And it has a bunch of free 20 minute office yoga classes, because with the brand of my teaching, I wanted to do something that would line up with folks who are coding, or who are learning development, and stuff that they could do as a break. So adapting crazy mountaintop, chameleony breath of fire, and sun salutations, where you need some flexibility and a mat, to something you could do at your desk.
  • Zac: But it's not your mama's chair yoga. Okay? Like I teach some crazy breathing techniques, where in three minutes you're seeing stars, and you're having insights, and it's like poof! So really, it's been a fun teaching opportunity for me to take some of the craziest and best aspects that I've enjoyed about studying different branches of yoga, and put them into something that's super easy and adjustable, right? Like taking something crazy complex like JavaScript, and trying to write a React book that anybody could pick up and get rolling with. It's all the same from an education perspective, the same challenge of taking something, distilling the essence of it, trying to find ways that are relatable and people can learn it, and then benefit from it.
  • Zac: So again, the cool thing about doing this is the folks that have tuned in. And it's not a ton, have a lot of JavaScript students, have very few office kind of folks checking in, but there are folks that come back. And they're like, "Yeah, yeah, I like this." And usually they're doing healthy stuff, or trying to get into healthy stuff on their own. So this is just one little part of it, and it's fun to be part of that. And again, just trying to make, if this is a personal brand, more personal to it.
  • Steve: Well, you know what? I've been to probably half a dozen different tech conferences over the years where they've held yoga sessions in the morning before each day of the event. It seems to be something that a lot of tech people are interested in. And there's a guy, Peter Bui, an Australian guy in the tech community and WordPress and Joomla, who has done a lot of the ones I've been to. He has a similar balance between having a yoga teaching side to him, and a tech side to him as well. He finds the two balance each other out.
  • Zac: Yeah, I've seen that a bit too. I almost want to stop submitting JavaScripts talks, or just start submitting office yoga talks in the morning. And I've been to a WordCamp Europe where they did that, brought in an instructor. I think it was WordCamp Europe, not US, if I'm not mistaken. But I love that. I think it's cool. And yeah, you see that and you look around. You're like, "Oh, this person obviously does yoga, and they're just here appreciating it." I think it's a cool option.
  • Steve: Well, there's a strand in quite a few open source communities to really put that kind of wellbeing on a much higher priority. I've been to quite a few DrupalCons over the years, where in recent years they've started to emphasize mental health and wellbeing, that there's quite a few talks which specifically emphasize avoiding burnout, having to deal with work overload. We're leading a healthier life. I think so many of us sit down for 10-12 hours a day, sitting at our screens, and suffer physically or mentally from it.
  • Zac: Oh, yeah, buddy. I'm seeing this too. More and more talks, just even within WordCamps and all the spaces it's happening. The burnout startup mentality is being called out for what it really is, which is like a burnout mentality. And I like this. I like this. I've been doing more of it myself, and it makes a big difference. It's hard because I think one of the things is you think that there's going to be no money, or there's going to be this stressor, and this, and you just have to do it. I feel like sometimes you do have to go through a bit of a bump, and phase, and hustle, and put stuff in.
  • Zac: But it can come in waves that are balanced and also times to let the system not be running in fight or flight mode, because man, we're just knocking years off of our experience and probably diminishing our experience at the same time. I don't know, we don't need to get into a whole mental health thing, but yes, it's out there, and I'm glad for it, and yeah, probably we're all going to be better for it and more creative. And just to pull it back to this React book, this was an example of taking the approach of, "You know what? I'm going to write an hour or two a day in the morning most days that I can." And it was a very relaxed pace, because in my thought ... You said a book could take a year. I was like, "Okay, if I took off six weeks or two months I could do this and just knock out the entire thing." Right? But didn't take that approach. It was much more relaxed, and I'm happier with it and for it.
  • Zac: And I also got the chance to teach React and test out the book a number of times along the way. So just some insight into taking it a bit slower, put trust in a little bit more. Not to say you don't have to hustle. This book was an effort, and learning all of this. I still do not consider myself a React expert, necessarily, because like so many things with JavaScript, it can go deep. But I really like this, and I think that it shows in the book too is supposed to be a bit chiller, more comprehensive, but easier way, and not just like, "Okay, we're building Reddit now. Go."
  • Steve: Yeah. A big portion of our initial discussions around the book were focused on what to leave out, and it still ended up being a 300 plus page book. But there were several different topics that you pitched that you thought should be included, and ended up being at some point you just have to stop and say, "Hey, we can only go so deep in a getting started book." They were probably at least three or four good topics that were left out. It could have been a 700-800 page book easily.
  • Zac: Oh, man. And this is where I've got to point out, anybody can publish a book nowadays. But Steve, working with you and someone who has experience writing books, you came back so often and were like, "Nope, nope, nope, not in V one. Let's just get it out." And that was so helpful. I don't know if I did this on my own, if I'd ever get it done, because it would be like 50 chapters long and growing. So yeah, figuring out ... I forgot how many chapters, and how much content, and stuff I had done and assumed it would go one way, and then it just simplified, and it found this really good niche, I think, with it. Now that said, we're gonna keep the book up to date. There are like at least two good chapters and some revisions I want to do because React is growing, but the core stuff that's in there is solid, and it's not going to change, and it's foundational on it, and I really like it. Yeah. Interesting process.
  • Steve: So if you read the book, you'll be able to get up to speed with the basics of React and probably a few steps beyond the basics as well over the course of 300 pages. Are there any steps that people can take after reading the book that would help them start to apply it? Because we teach React in a way that you could use it in a Drupal environment, a WordPress environment. Say, for a WordPress listener, how would they take what they learn in React Explained, and apply it to building Gutenberg blocks, for example. Are there any good resources?
  • Zac: Yeah, well that's funny. At first off, you could actually go and read the documentation tutorials and see that it's all React, and understand everything that's going on. And then you realize, "Oh, I could actually just write normal React in here, and this is cool. This is pretty simple and straightforward. It's one of the beautiful things about the way they designed Gutenberg, if you do know React already. So that one's super easy. Thinking in terms of themes or other plugins, anything that you would've done a little interactive widget or area before, React is cool for being able to drop into a page on any of these CMSs, and just do a little interactive thing on the front end. Maybe hit the REST API to get some data, and we show that.
  • Zac: Actually, there's one example in the book of how to get API data is actually using a WordPress REST API. I don't tell anybody that, but I'm like, "What are all the examples we can do? Let's just do this." So that's a little tidbit for the WordPress folks in there. And you could plug it into any API and get that stuff, so I think that that's the starting point now. It's almost that you need to know React in order to do any of this stuff. So it only helps you, and then building little widgets and cool things from there. It's going to be an easy transition for folks, I think, especially those who had jQuery solutions, or dynamic little widgets and things before.
  • Steve: Ah. Can I circle back to something you said about 30 seconds ago? You mentioned that the way Gutenberg is designed, it's possible to write pure React and get up and running. I'm curious because one of the common complaints I've heard about systems which will import libraries and frameworks from elsewhere is that they often get very mangled during the import process. I heard that a lot with Drupal 8 when they imported Symfony. It ended up not quite being Symfony, but a kind of Drupalized version of it. And I know Jim has done the same thing with Bootstrap, for example, ended up being a pretty impure version of it. Are you saying that if someone wants to start writing React in WordPress now, there's not too much in the way of major changes? It's a fairly pure version of React? What they learn in the book can apply directly to their WordPress development?
  • Zac: Yeah, so off the bat, to set up a block in WordPress is just a JavaScript function, and then for one of the settings, it's like an edit setting, you pass it a React element. So you could literally just drop in your own custom React element there, and be rolling, or WordPress gives you some like default styled ones that you could do. Now WordPress did build an abstraction layer on top of React, so you don't actually import the entire React library. You import ... Well, WordPress imports and then renames thing ... Well, they basically with React you have pretty much React, but you don't always have the latest version. WordPress is going to step it up in case they want to keep anything backwards compatible.
  • Zac: Now they did build this interesting thing called attributes, which is kind of like ... I think of it, if you know React, it has a state system in it, and they built their own state system on top of React. So there's attributes and set attributes type system, and if you're familiar with React, it'll make sense. But there is that kind of weird WordPress thing on top of it. And then when we get into Redux, their bigger state management system, they didn't just give us a Redux. They built a system using Redux, which in the end is a lot simpler because we just call special functions and get a bunch of data. We don't have to actually use Redux head on. But yeah, there are some abstraction layers.
  • Zac: I did some courses on Gutenberg block development and advanced block development with the React layer. So if folks want to check out those, it'll get into the specifics. So I guess I'm kinda broad brushing it that, "Yeah, we have React, and you could just use native," which is true, but there is some wiring and a few differences there. But I think that they were as eloquent implementations as they could have done, keeping so much of WordPress the way it is.
  • Steve: Cool. So how long would it take someone who maybe has a little bit of JavaScript experience, some React knowledge picked up from React Explained or somewhere else, how long would it take them to get up and running and start building Gutenberg blocks? Do they have to download one of the Gutenberg block scaffolds that are available on GitHub, or can they start writing from scratch? What would you recommend that someone with some background in JavaScript do to start digging into Gutenberg, and start writing blocks?
  • Zac: Well, of course I gotta plug my Gutenberg Development Course, because I think that that's one of the easiest ways. But if you are someone who can learn just from repos, all of my course repos are open. So you could just go to the Gutenberg Course repo, start up there at github.com/zgordon, and you could just see a dozen different blocks, and figure out on your own how some of them work. The documentation is getting better, and there's like WP Storybook for using the Storybook app to look at all the WordPress components, so you can get an idea of what's out there.
  • Zac: But yeah, I gotta say they built ... When you open up Gutenberg source code and you interact with it, yeah, it's a React app. It's pretty cool, and it looks like React. So this book is a great way. So I try to teach Gutenberg so that you don't need to know React, but if you do, it just helps give you context for how so many things are working, and how to customize it on your own.
  • Steve: Cool. So congratulations on the book launch. You've just finished a big project, took several months to get this book out. Are you focused on anything else coming up? What's the next big thing you're working on?
  • Zac: Yeah, well, in the immediate, along with this, working on a course for React along with the videos and kind of taking people through it who like to watch that video. From there, a lot of Gutenberg, man. It's keeping my attention, all the JavaScript that's going to be coming over the next year or two or three. They haven't even rebuilt the customizer yet. So that's kind of always on my side, the front burner, maybe just back for a second. But some of the headless WordPress stuff, Gatsby, a React framework, doing something that's API and decoupled from WordPress, also is a shiny thing for me that is very intriguing.
  • Steve: Okay. So we've talked about using React for Gutenberg, but pretty soon it'll be React for widgets, React for the customizer, React for themes, potentially, as well. This thing is going to go deep.
  • Zac: Yep, yep, yep. It's actually gonna get shallower, but yeah, everything's going to come to the surface, and the more you do with that, yup. I think so.
  • Steve: Cool. So you're working on more Gutenberg and more React training. Where can people keep up with you?
  • Zac: Yeah. If you're on Twitter, @zgordon is that one, and javascriptforwp.com is where I have most of my courses, zacgordon.com my site, and please reach out. Say howdy if you've taken a course, or ask me about stuff if you have questions. Try my best to help.
  • Steve: Wonderful. Thank you so much, Zac.
  • Zac: Hey, thank you, Steve, man. Really appreciate it.

About the author

Steve is the founder of OSTraining. Originally from the UK, he now lives in Sarasota in the USA. Steve's work straddles the line between teaching and web development.