Who Is This Wes Bos?
At the end of last year, I had a straightforward, easy-to-understand and even partly visual answer to the question who Wes Bos is.
@wesbos in a nutshell:
['🐓', '🐓', '🐓'].map(🔥);
// ['🍗', '🍗', '🍗']
— Thorsten Frommen (@thorstenfrommen) November 5, 2016
Anyway, Wes Bos is a full stack web developer and designer from Hamilton, Canada. You might know him from one of his awesome, high-quality video courses, for example, ES6 for Everyone, React For Beginners, or, his latest one, Learn Node. If not, you really should check them out.
Why This Interview?
Several weeks ago, Evan You, creator of Vue, stepped in and responded to a few questions and comments by either WordPress core committers or other participants in the discussions. While this sure helped clarify quite a few things, it, of course, also pushed Vue as an option.
Just to make that very clear: I do not have anything against Vue at all. I only heard good things, but I never used it myself so far. However, I thought that React, as second party in this battle, should get the same as Vue: someone knowledgeable who can provide meaningful insight into using the framework in and for WordPress.
Questions and Answers
Now, let’s get to the interview then.
Wes: I first used it in pretty early days, probably WordPress 1, probably eight, ten years ago. I initially got into it, and I was a big fan of that. Back then, the big plugin that got released was this thing called Flutter. It allowed you to have custom fields, and that was huge for us. But since we’ve all changed through a couple different plugins. I was big in the Pods scene for a while, now I’m into the Advanced Custom Fields scene.
When did I last use it? Probably about two weeks ago. My own site is on it, my wife’s site is on it, I have a couple client websites on it that I still maintain, couple other things… Tons and tons of different installs on WordPress.
Wes: I don’t know. I think that React and Vue are sort of the hot ones right now. I think they’re both very good choices. Obviously, there’s other frameworks that are out there. Obviously, Angular is the big one. Marko from eBay seems to be a really nice one as well. There’s all kinds of other frameworks that could be, but I think going for the most popular one is a great idea, just because that’s going to give people the best option in being able to create things for it.
You know React inside out, no questions asked. Do you also have any experience with Vue?
Wes: Not really. I played with it a few times here or there. From my very limited impressions, it seems really easy to get up and started, which reminds me of Angular 1 days. It’s kind of like you try it, and then: oh, this is nice.
I think React has a lot of stuff that you need to keep in your head, like binding and all these weird gotchas, whereas Vue sort of just works, which is really really nice.
When and why did you choose React? Have you ever wanted to actively turn away from it? Do you see this coming?
Wes: I was initially an Angular dev, during Angular 1 days. And then Angular announced Angular 2 like way ahead of time, and they said it’s gonna be totally different. So there was this two-year period where I was kinda like, well, what’s the point of putting any time into Angular 1 if it’s all going to totally change. And then Angular 2 was so far away that it’s not I could just sit on my hands and wait for it.
Turning away from it? No, I don’t think so. I’ve always liked it. I mean, there’s lots of things that I don’t like about it, but you sort of just learn to work with those. That’s just part of buying into a framework.
Wes: I don’t think that’s a good idea. I think you should pick something that is already out there, and something that will be around for a while. Otherwise you have to learn yet another WordPress framework. I think that sometimes developers pigeonhole themselves into being a WordPress developer, rather than just a web developer and WordPress is a tool—that’s always been my approach to it, and WordPress is just one of the many tools that I use. So, it’s better to sort of get away from thinking in terms of WordPress, and get more into thinking in terms of a web developer, where WordPress can help you. So any WordPress-specific stuff—I’m not always a huge fan of. Besides from things like themes and plugins, which obviously need to be done on top of the WordPress core.
There are quite a few concerns about React being hard(er) to learn. With your React For Beginners course, you claim people can learn React in an afternoon or two. How does this fit together? Do you think React is hard to learn? What do your students say?
So, I think that is hard, but once you get over that initial hurdle—you could do that by taking my course, or doing a couple tutorials—you can get over that fairly quickly. And I think that it’s good for you, because it overall makes you a better developer. And, of course, I think that’s why my course is doing so well, because React is a little bit hard to get up and started with, so that’s exactly why you need to put in a little bit of time, or do something like my course.
My students say that it’s great. They say that it was hard to initially learn, because there’s so many moving parts, there’s so many tutorials out there, but if you can have a singular resource you can just focus in on, then that would really help.
React is licensed by Facebook, and there is this additional grant of patent rights that has been subject to the most controverse discussions. Did you ever run into any trouble because of this? Or did you ever have a bad feeling when (thinking about) using React? Should WordPress?
Wes: No. But that’s because I’m not anyone who is building products that is worried about this. A lot of people asked my this question, and I don’t really know. The answer seems to be: use Preact, which uses the exact same API, but is not licensed under Facebook. So that’s sort of an easy one to do, and that’s been tested with the whole Google Java thing where they have used the same Java API, but recreated it themselves. So, I don’t know. I really wouldn’t sweat it all that much, but I’m not a lawyer at the end of the day.
Let’s assume there really was some danger involved when using React, the framework. Fortunately, there are other options out there that follow the same (or fairly similar) principles that React is built on. For example, Preact. What are your thoughts on this?
Wes: Yes, I think Preact is great. Especially from performance and licensing standpoint. I think it’s really cool that React has built this standard API, and then everybody can build different frameworks using the exact same API.
Something (that should be) very important is state management, both in the WordPress admin and in the front end. Do you agree? What does React itself, but also its ecosystem offer in this regard?
Wes: Yeah, you definitely need a state manager, especially when you’re going to be getting heavy. It’s easy just to use state if it’s all your application. But when you get into using third-party components, or being able to integrate into somebody else’s React, a state manager is gonna help you quite a bit in this case. And at this point, Redux seems to be a really really solid option, and I’ve recently been looking at Apollo, which uses Redux under the hood, to do this as well with GraphQL. So, definitely, that needs to be taken into account when looking at WordPress.
Wes: I think that if you were building a plugin these days—and especially if WordPress adopts either Vue or React—then it would be a great idea to build it entirely on top the REST API, rather than having to deal with page refreshes and whatnot. You could build some pretty slick plugins, and I know a lot authors are already doing this.
Finally, which of the two frameworks do you think will win, and ship with future WordPress releases? Why?
Wes: I don’t know. I wish that I could predict the future, but—if you pardon the pun—I’m more of a React-ionary guy. I think that there’s people really taking time to consider all the ins and outs of all the different frameworks, and I rather them do that than me, who hasn’t spent a whole lot of time reading into it, just sort of slinging opinions here and there.
I think whatever they choose to go with—whether it’s React or Vue—will be a really good choice. And I think people will be pretty happy with it over the years as it starts to develop.
Thanks a lot for your time and knowledge, Wes. Really very much appreciated.
Wes: You’re welcome.
- For something like WordPress, a dedicated state manager helps. A lot. And Redux seems to be a really solid option.
- No matter if it will be React or Vue, it will be a really good choice, and people will be pretty happy with it.
What Do You Think?