chantastic.fm

17: Fast, Accessible, and Beautiful Drag and Drop with Alex Reardon

Episode 17 · August 21, 2018 · 00:36:56

Hosted by chantastic · With Alex Reardon

Download MP3 · Jump to transcript

Chantastic talks with Alex Reardon about his project react-beautiful-dnd. They discuss the physics of drag and drop, accessibility in any language, tricks and tactics for performance tuning UI, and engineering health in open source.

Check out Alex’s free egghead.io course Beautiful and Accessible Drag and Drop with react-beautiful-dnd!

Featuring

Links

Transcript

[00:00:06] Sponsor: This episode of the React Podcast is brought to you by ReactTraining.com. In-person, hands-on training for development teams from React community leaders and experts. Visit ReactTraining.com to learn more.

[00:00:20] Michael Chan: This is React Podcast. I'm Chantastic, and today I have the distinct privilege of speaking with Alex Reardon. Uh, he's a principal developer at Atlassian. Atlassian is known for making uh software like Jira, Bitbucket, and Trello, and a bunch of other stuff that you might be familiar with as a developer. Alex is joining us today to talk about React Beautiful DND, a performant and uh really elegant solution to drag and drop in React. Before we dive into React Beautiful DND, uh I kind of wanted to hear about your role at Atlassian, um what you're doing there, and kind of what your team is doing.

[00:01:03] Alex Reardon: Yeah, cool. So as you mentioned, I'm a principal uh engineer at Atlassian. I kind of work uh exclusively in the front end, uh which has been great. And my role is I kind of work on a platform team. So what we do is we build components and utilities that are shared across uh lots of our different uh products here at Atlassian. Uh for the kind of last year, I've been working almost full-time on React-Beautiful-DnD, which has been uh such a uh pleasure to do that.

[00:01:33] Michael Chan: That's amazing.

[00:01:34] Alex Reardon: Yeah, yeah, it's it's really very uh very lucky, very fortunate. Uh but my wider team is sort of responsible for building sort of the the components that you would see in really every interface in almost every product. So things like buttons, dropdowns, tooltips, all that sort of thing.

[00:01:51] Michael Chan: Cool. Is that the Atlas Kit?

[00:01:53] Alex Reardon: Yeah, that's the Atlas Kit project. It's actually open source, so you could use it in your own products if you wanted to. Yeah.

[00:01:59] Michael Chan: Now, how long has Atlassian been using React and kind of what was the inspiration? What's the role that React plays at Atlassian?

[00:02:07] Alex Reardon: Yeah, so I think I was on one of the first projects to use React at Atlassian. And this was back in late 2015. I was looking back through my emails in preparation for today. And yeah, so that was sort of when it started and it kind of happened pretty organically. Like there wasn't a big, this is what we're going to do. It was more, I think people just sort of caught the vision of what React was and what it was trying to do. And more and more products just kind of started adopting it.

[00:02:35] Michael Chan: So what was um what was kind of the core front-end framework that was being used um before React?

[00:02:41] Alex Reardon: Yeah, so most of our products are actually distinct uh code bases, uh so that there was a bit of variance, but generally some sort of Backbone, Marionette stack, something like that. Our Backbone was pretty consistent uh throughout. Some were Angular, I think. Some of the like smaller ones may have been Angular, but yeah, generally, generally Backbone. Yeah.

[00:03:01] Michael Chan: And before React's AtlasKit, did you have a component library? Was it in CSS, or did you have um kind of other ways of bundling JavaScript and CSS together?

[00:03:13] Alex Reardon: Yeah, so that sort of predates my time on the team that I'm on. But yeah, we did have a- and still do have a frame- a project called Owie, uh which is a like a kind of a jQuery add-on for to, yeah, sort of have components and sort of those shared like pieces of UI. Um but it's sort of just a big, big flat pack. Like you you take Owie version 2. Right, and you get all everything. Um and if you want the latest dropdown, you have to get the next version of AWE.

[00:03:43] Michael Chan: So what was your experience um before React, and how has um using React been helpful to you and your team um kind of in developing things effectively?

[00:03:54] Alex Reardon: So I've I've used lots of different libraries and frameworks over a course of many years. I think before I was using React heavily, I was actually very sold on Angular. I was quite involved in Angular 1. I spent probably a year working almost exclusively in Angular 1. And I sort of overcame that hump, you know, that learning hump that that was there. And I felt like I was able to be productive and build really exciting applications uh with Angular. And then, yeah, obviously a lot of Backbone as well. Uh why React was sort of interesting to me, I think it just sort of started as a Like a side project, sort of just playing around with things. I like to fiddle with new libraries, and I built, I think, a little budget app in React just in my own time, just because it sort of had been gaining traction. I think I was a bit late to the party, so I started playing with it around 2015. It obviously had been out for a while before then. I feel like I'm pretty hesitant to jump onto new libraries and frameworks, uh, just because it's just- there's so much churn. But I felt like it had reached this point of like where big players were starting to sort of move in that direction. And I was like, you know what, I'm just gonna try it out.

[00:05:08] Michael Chan: I remember when it originally came out, I felt like this doesn't seem distinct or innovative at a surface level, at least in such a way that it would require me to kind of rewrite the stuff that I already have. Did you have any opinions, like immediate first impressions of React?

[00:05:24] Alex Reardon: It's hard to remember because it was a few years ago now, but I'm gonna say it was probably JSX. I saw this and I was like, what is this? Like, what is this? Is so- it goes against all the separation of concerns stuff that I'm so passionate about. Why is the HTML in my JavaScript? Like, what's going on? That was probably something. But it was just also like this. If you just look on how many new packages come out all the time, like, realistically, you just can't look at all of them. Uh, so I think I think it was also just I hadn't had, you know, gotten around to looking at it.

[00:05:56] Michael Chan: So, um, let's talk about uh React Beautiful DND. Um, so you mentioned right in the beginning of the docs, like right up front, that um there are other great React drag and drop libraries. So I'm curious, what makes React Beautiful DND different? Why should someone consider this library?

[00:06:16] Alex Reardon: Yeah, so as you mentioned, just at the outset, like it's It's not for everyone, uh and that'll hopefully become clear as I explain a bit more. So React Beautiful D is a higher level abstraction for drag and drop, and it's specifically focused around lists and lists of lists and sort of connected lists. Uh so the idea that we're trying to push is within that subset of the drag and drop space, we're trying to make drag and drop more relatable for people. So drag and drop is one of those just amazing interactions in software that is just so expressive and so relatable for people. Like, we're always moving things around in the physical space. Like, I can move my cup from one part of my desk to another. Like, that is a very, like, human interaction. And so what we've sort of been trying to push is a drag and drop experience that is more physical, more grounded sort of in physical metaphors, with the idea that hopefully we can create an experience that is more relatable for people, so people can kind of understand more quickly what's going on. Like, it's not a software idea, but rather a, like, a more physical idea. That's sort of the the high-level, like, goal of the library. But also, as part of that, we're trying to have this experience for anyone who wants to use drag and drop. So React Beautiful DND uses like a state-driven drag and drop approach. And so what that means is that we can really have any input type to drive a drag and drop experience. So our version 1 actually shipped with full keyboard support. So you can do drag and drop interactions only with a keyboard. Um and later on we shipped uh screen reader support. And so now if you have some sort of visual impairment, you can do drag and drop interactions using only a keyboard and just listening to it as well. Um, so you'll find that in this library, there isn't as many kind of drag affordances as you might find in other libraries. And what we're trying to do is rely more on uh movement, movement to communicate uh positioning.

[00:08:28] Michael Chan: Sure, so that sounds like a very interesting distinction. So If I understand correctly, where other React D&D libraries might be um just a very low-level API on top of the browser APIs, um you're really providing um some some strong opinions about what the actual interaction should feel like when you're moving things around.

[00:08:52] Alex Reardon: Yeah, that's exactly right. So, we've tried to hit this balance between we want consumers to be able to style things and however they want while also sort of providing that, yeah, more natural movement uh experience. So yeah, exactly, you're totally on point. It's it's a more opinionated uh version of drag and drop.

[00:09:12] Michael Chan: Yeah, there's a there's a really great graphic as I was kind of looking through the documentation showing how you— uh I can't remember exactly, but how you resolve um kind of some of that natural motion and um demonstrating kind of the mass of two elements. If you have like a bigger element and a smaller element it kind of changes the shape to show like an arrow and how it would kind of go under the mid- the bigger element would go under the midpoint of the smaller element. And that's all kind of like baked into the kind of core idea of this lib- this drag and drop library, right?

[00:09:43] Alex Reardon: Yeah, that's exactly right. So what you're talking about is when you're moving something from one list to another with a keyboard, like if you press say the right arrow to move, you know, something to another list, like where should that item end up? And rather than taking kind of a more software approach where we go, oh, you know, just move it to the same index or whatever it is, we actually tried to think about it through the lens of, well, how would this work in the physical world? Like if you had one object and you had another object and you push them into each other, like, and if you if you think that these objects had, say, a point on them, like which one would go above the other? And so that's sort of the ideas So that's sort of the idea of like something that's bigger, potentially next to something that's smaller, might go underneath it or above it depending on where their center of mass is. Um and so we've kind of applied that that sort of thinking to like hopefully every area of the library, like thinking about physical metaphors for all of these micro-interactions.

[00:10:38] Michael Chan: As you develop this, do you kind of like just push big objects and small objects together on your desk, or do you have research papers that you go to? Um where where are you getting inspiration for these uh physical metaphors? Metaphors and how they would apply to your library?

[00:10:52] Alex Reardon: Yeah, as I said, like, as human beings, like, we live in a physical world and it's just all around us all the time. And it's just thinking about it really, like, like, yeah, even if you just had two balls and you like rolled them towards each other and they hit, like, which direction would they go in? Like, it's not- you don't have to understand that much to, to know that what would happen. Um, so that's sort of how we've been thinking about it.

[00:11:13] Michael Chan: Interesting. So, um, who might this library not be for?

[00:11:18] Alex Reardon: Yeah, so if you're creating like a very uh creative drag and drop experience that sort of breaks out of the idea of lists and lists of lists, which is, you know, fine, like you might be creating a game or something else like that, then then this library probably isn't for you. You may just want, as you mentioned, like another library like React DND, which provides you some really helpful primitives that you can then build uh experiences on top of.

[00:11:47] Michael Chan: Speaking of React-DND, um, what were some of the inspirations or history that made you think, you know what, it's time for us to take on our our task of building this this new React uh DND library?

[00:12:00] Alex Reardon: Yeah, great question. So in late 2015, I was working on a product called Jira Core, which is a sort of a lighter version of Jira. And we wanted to have a a board, a new board for that. And we were gonna be writing it in React. Um and React-DND had shipped, I think, a few months before that time. Uh but we just couldn't get the experience that we wanted with the HTML5 drag and drop API. Uh especially in uh older browsers. Like we at the time we were supporting IE 9. And we just couldn't get the visual kind of effects that we wanted. And so maybe a bit naively, we just said, hey, like, how hard can it be to write our own uh drag and drop uh implementation? So that's what we did, and that shipped to customers, and I was pretty happy with it. Uh about 6 months later, we ended up rewriting that uh to sort of take advantage of some new performance learnings, and that has been pretty successful. That's actually still in Jira Core today. So if you create a new project in Jira Core uh and you get a board, like, that's still using that That code there. Um. Yeah, so that's sort of where it started. Uh, maybe maybe a bit naive uh in thinking about it, but it really gave us the opportunity to as a like push these new ideas or new thinking behind drag and drop. And I think when we started, we didn't go, yes, we want to build like a more physical drag and drop implementation. As we were creating this thing like from scratch, we we sort of questioned a lot. Of the behaviors that you sort of find in normal drag and drop libraries. It's like, hey, like, do we need this? Like, what if we did it this way? And we thought about the problem a bit differently. So we didn't sort of set out with this goal in mind, but it definitely kind of evolved over time.

[00:13:50] Michael Chan: Yeah, absolutely. Now you've mentioned uh performance a couple of times. Um, what are some of the— uh what have you learned about performance in in building this?

[00:13:58] Alex Reardon: Oh, some of the things I've learned uh with performance, it's been a massive journey. I've blogged about this uh a few times. I won't go into all the details uh here right now, but it's definitely been a huge journey for me. So, boards and drag and drop pose a massive performance issue, which probably isn't common to other React applications. So, drag and drop as a problem space, we have- we're pushing for 60 updates per second. Um, we're di- we're moving this thing around in response to user input, and we're moving other things out of the way. So, we have very, very frequent updates. We have lots of shared states, so between components that need to know, hey, I need to move out of the way now. And we need it to be very, very quick. We need those updates to be quick. We can't kind of cheat and do an update every 20 milliseconds or something like that, because then if a user's dragging, the item would sort of jank around the page. So performance in React is really great out of the box. Like most for most applications, you won't really need to do that much at all. to have a very performant application. And even if you do, there may be just sort of some little things that you can change here and there to greatly improve your performance. Uh, just because of the nature of the problem of drag and drop, uh, we really needed to optimize so much, so many different steps uh to make this experience good and good at scale if you have lots of connected components. Um, so probably the the biggest learning or biggest things I can share in terms of if you really want to push performance very quickly, it's you need to be aware of what is what what is rendering and when. So render functions and the reconciliation process is amazing and it what kind of gives React its power, but it's not free. Like it does cost you something to do. And so the less work that you ask React to do, like the faster it's going to be. That's sort of the the big idea. Um you just want to let React do as little work as possible. And so there's a lot of techniques about how you do that in different spaces. I have some ones that I'm really proud of, some like really interesting techniques to to reduce the work that React needs to do.

[00:16:03] Michael Chan: Yeah, so what are some of what are some of those techniques? Are you able to use some of the uh dev tools that are provided by React, or do you have to step out of those for the more advanced things like React Beautiful DND?

[00:16:14] Alex Reardon: Yeah, so the React tools are fantastic, and that can be really helpful. At some level, ultimately, all you really need is like a timing function. Like start a timer, do some work, stop a timer, see what happened. Um, console.log is like an amazing tool. You know, you can you can do a lot with console.log. Yep. But yeah, the React tools, like really they're showing you, hey, when you did this thing, these components rendered. And you need to question like, hey, like should those components have rendered like when this value changed? And if the answer is no, and then maybe you can opt out of rendering for that. And again, like maybe you don't you probably don't need this just for like regular applications. This is just for very high performance scenarios. Um you may want to to tweak what is rendering and when. And if you have a shared management, like if you're using context for state or if you're using uh like Redux, like that introduces another problem space as well that you need to sort of think through. Like if you have state that is being shared across lots of components. You need to make sure that for like these high-performance scenarios, that when you update values that are shared across lots of ones, that ideally the ones that don't need to render aren't being rendered or aren't having their render function called. And a technique that I'm also really interested in is this idea of dynamic style updates. So I mentioned this in one of my blogs, but this is sort of a more creative idea where like sometimes we want to pass stuff down to components to say update styles. But that's not the only way to update a style on a component. So we've kind of got some tricks uh that I that we got where we will actually dynamically update style definitions in the head uh to avoid needing to re-render a component or have its render function called. So yeah, there's kind of like little things like that where if you really need to go down that path, there are some options for you.

[00:18:05] Michael Chan: Now, is that something that's baked into the library or is that kind of opt-in? Uh if if someone had a different idea, would they be able to opt out of that?

[00:18:13] Alex Reardon: Yeah, so all of the stuff that I mentioned is all baked in. But all of these those those things like those styles I mentioned, they're non-opinionated styles. So they don't actually impact like how you want things to look. It's just things like we're gonna put pointer events none on everything, say. Um and so instead of you know dynamically changing all the items to apply that style, we just target them using a selector and and change all their styles using something like that.

[00:18:40] Michael Chan: Yeah, yeah. Now how does um React uh Beautiful DND handle accessibility? Does it have conveniences for those out of the box?

[00:18:48] Alex Reardon: Yeah, great question. Um, something I think I'm the most proud about with React Beautiful DND is how accessible it is. So, I think I mentioned before that it ships with keyboard dragging out of the box. Yeah, yeah. And it also ships with English screen reader messaging out of the box. Wow. So if you're just pulling it in, like often like the libraries will have like tools like, hey, this is how you could do screen reader, but we actually like did all the hard work of figuring out how it works and baking it in so that you don't have to do anything. Like it's just gonna work, it's gonna work on multiple lists and that's great. Um, but obviously limitation is we could only really ship English. We don't wanna make it too big. We can't ship every language in this bundle or it'll be massive. Um, so we have every single message that we do is completely controllable by you. So you could- we recommend that people kind of update them to potentially make the messages more friendly for your context. You know, give like, hey, you're dragging a task from one column to another kind of ideas, rather than uh maybe more general things like you're dragging an item, which is I think what we ship with because we can't really know what it is that they're dragging.

[00:19:54] Michael Chan: That's really interesting. I've not heard about uh a library having kind of different languages for their their messaging. Um, uh do you have other libraries that you took that as inspiration from, or is that something that is kind of just a high priority for you and the team?

[00:20:14] Alex Reardon: Uh, yeah, it's something that we're very aware of as a platform team. Like Atlassian, I think, does a really great job of having all of our products kind of available in lots of different languages. And so while I mentioned that React Beautiful DND ships with English out of the box, but we also have the ability for you to control that messaging completely. So that then is the hook for you to add in your own languages, your own stuff like that. Um so it means like with a combination of keyboard dragging and screen reader support, like somebody who is visually impaired uh can actually drive your interface just as well as somebody who is completely able to see. So you don't need to actually see the page at all to be completely aware of what's happening. And there's no limitations of what they can do. Like anything someone can do with a mouse or with on the phone, somebody can do with a keyboard and a screen reader. Like we don't sort of limit that, which is I think just um such an achievement for me. Like something I think I've I think the holy grail is like we always want to ship accessibility, but it sometimes gets you know sidelined, something we want to do later or like we'll do it eventually. Yeah. Uh, something I'm, I think, most proud about this project is is that like version 1 shipped with keyboard support. And I think a few versions later we shipped screen reader support. Like it's something that we wanted to have like front and center in the library. And I think if we hadn't have done that from the beginning, like it probably would have never happened. Like it's just so hard to go back and retrofit like good accessibility into things.

[00:21:40] Michael Chan: Oh yeah, absolutely. Now this this might be a hard question to answer, but I know there's a a question of like how much extra time uh accessibility takes. What would you say like kind of like the percentage of like keeping accessibility at the core, kind of extra time it might add to just like the regular development?

[00:21:57] Alex Reardon: It's hard to comment generally because for normal sort of websites and applications, there are a lot of really great uh techniques you can sort of use already. Um what we were looking at is like, as you mentioned, like that problem of if you have a keyboard and you want to move with arrows around and you want to move from one list to another, like What do we do? Like there's a lot of math to figure out this thing like needs to move and and end up in the right spot and other things need to move out of the way and we need to do this in a very performant way. Uh so there's like a lot of problems we need to solve, uh which you know if you're just using a mouse you wouldn't have to solve it because you're always just doing things in response to user kind of events. Whereas when you have a keyboard like and you say press right like you know, there's a lot of math there to figure out, okay, what, where's this thing going? How do we move it there? Where is it actually moving? What's moving out of the way? Um, and all that math you wouldn't have to do if you were just doing, um, purely in response to, to user input.

[00:22:53] Michael Chan: Absolutely. Now you mentioned that that requires a, a lot up front, and it's not something that you can just tack on. And do you feel like having that constraint has helped you build a better library in terms of the keyboard stuff, having to figure out the accessibility side kind of forces you to build things- build it in a more robust way in terms of keyboard navigation?

[00:23:15] Alex Reardon: Yes, absolutely, without a doubt. Uh, it has really enabled so many things. Uh, so React Beautiful DND actually works in a similar way to React in that it- when you start dragging, we kind of performantly create a virtual model of all of the things that we care about. And then during a drag, we poke those things to get them to do what we want them to do. And by forcing us to think about keyboard, we've had to be really clear about uh the difference between inputs and and their effects. Um so we have all these kind of state functions that work— like that have no awareness of what's going on in terms of what the user is doing. Um so we have this decoupling between the the driving of the inter of the experience versus like our our math to figure out what what happens. And that will- so right now we support mouse, touch, and keyboard, but conceptually we could support really any input type. Um we could support voice dragging, so you could say, hey, like, move the thing from position 1 to 5, and rather than just jumping, like, we could actually make it drag there, um which would be pretty wild. Or like Um, something I'm hoping to ship soon. Hopefully we have uh like hackathons here, maybe I'll do it. Like a programmatic API. So you could actually say like in code, like I want this thing to move down too. So what you could do is have, say you had a a a board and you wanted to say replay like some the most recent actions. Like you could press a play button and programmatically these things could move around as if they were being dragged around. Or if you think about potentially having it so it's like through a WebSocket, like maybe something's coming in and you could see someone else dragging something around, right? Uh, which would be pretty wild. Um, but now this kind of stuff is enabled because we've we've decoupled that input from the effects and keyboard has forced us to do that um kind of upfront.

[00:25:13] Michael Chan: So where is uh React Beautiful DND being used at Atlassian today?

[00:25:19] Alex Reardon: Yeah, so it's being used in almost every product. I say almost because there's a lot of products and I'm not 100% sure that every single one of them is on it, but a lot of the products now use it in lots of different ways. So it's in like Jira, Confluence, Stride, uh Portfolio, like lots of different things. Um, I think it's going into Trello very soon uh as part of like a reordering from their menu that they have there. Um, so it's sort of being adopted very quickly internally. And everywhere. And if you sort of go into Jira Software today, and if you go, hey, I want to create a new software project, it'll create like an agility project, which is sort of the new types of projects that that we're working on. Uh, that will actually be a board that's completely driven by React Beautiful DND.

[00:26:04] Michael Chan: Awesome, awesome. So uh, there's there's obviously any time you have a component library with uh composition involved, there's kind of that higher-order component versus render props um debate. Um, I know that the the latest versions um use that render prop style or the function as children. Um, has that always been the case or was that kind of a recent decision?

[00:26:27] Alex Reardon: Yeah, so just before I released version 1 of React Beautiful DND, the API was completely different. It didn't look anything like what it does today. I think it it didn't use higher order components, but it it didn't use render props. It used some weird other pattern that I can't even remember, like some sort of decorator, something, I don't know, it was weird. But yeah, so from version 1, it's used Render Props. I think we were pretty quick onto that. I was quite inspired by React Motion. I think that was the first one that I saw that used Render Props. Uh and Michael Jackson as well sort of had recently talked about how Render Props were great. And and it was sort of like this moment of, oh, this is just such a great way of modeling things, especially for us because We don't render any DOM elements, um, and we're we're really kind of proud of that. Like, you render everything. Like, we don't want to be rendering wrapping divs or anything like that. So you have like total control of everything. And that was really important from a styling- for styling reasons. Like, if we wrap things in a div, like, that's just- it creates a whole world of problems. Uh, and render props sort of allowed us to be very clear about what we're giving To consumers, as opposed to say a higher-order component where you like spread props and like all this kind of like wildness. It's like with a with a render prop, it's like this is what we're giving you, like and you can do with it um what you want. We kind of do some interesting things with render props. Like we sometimes, like one of the things we do is provide a function where you give us a DOM ref back. Um and there's sort of just so much flexibility in that that pattern of doing things. Uh, but yeah, so it was kind of this funny thing, like we were just about to ship and we actually, I think it took about a week or two to rewrite like the entire API to be uh render prop based. And that was, I think, the best move we could have done for the success of the library. Yeah, because it just made it so clear to understand what was going on. It's like, oh, like this just makes sense now. Like it's so, it's really clear to see what's going on.

[00:28:28] Michael Chan: Awesome. So I saw in a tweet um from you recently that 8.0 is 23% faster 18% smaller, uh and it has like improved error messages, which we've talked about, um but also uh huge improvements to engineering health. Um and that really caught my attention. Um do you mind speaking to that a little bit and what engineering health um means to you and how you measure it?

[00:28:49] Alex Reardon: Sure. So I'm really proud of the engineering health like ethos in React Beautiful DND. Like we take it so seriously. Uh if there's some sort of friction in in some internal abstraction, like we're very quick to refactor that. Uh so we use a combination of different things to help us to promote our engineering health. So we use types. Like if you're not using types in JavaScript, like definitely get on that. We use Flowtype, which I'm loving. Um we use Jest and like I think we have just an obscene amount of tests. And and those two things kind of help us to be able to move forward quite quickly. Um there's also a lot of engineering health we do around like the builds and how we approach that. I've been very deliberate in trying to keep the repo setup quite simple. I think it's so easy to sink so much time into tooling. So I'm trying to keep that fairly simple. But uh from an engineering- like from kind of stepping back and thinking about the health of the repo kind of more generally, something and something I've been trying to push with the library is like We want to have an open bug count of zero. Like, we don't want to have any open bugs. So when a new bug comes in, like, I kind of take this idea that I will not be shipping any new features while there are open bugs. Um, and obviously, you know, that maybe needs to be a little bit flexible sometimes, but that has been such an important part, I think, of React Beautiful DND success. Like, when you install a library, you want it to work. Like, it's okay for a library, I think, to have limitations, to say like, we don't support this and that's okay. But if if it's if it's not performing what it needs to do or what it says it does, then that to me is like, that feels really broken.

[00:30:30] Michael Chan: Yeah, is that a goal that's resonated pretty naturally with people, your the contributors and whatnot?

[00:30:35] Alex Reardon: Yeah, yeah, I think so. But it's sort of something that you don't think about because when you take it, when you have a very low bug count, like in our case, we don't have any. Like when something comes in, like, you know, you just you just deal with it. Quite quickly.

[00:30:48] Michael Chan: Sure.

[00:30:48] Alex Reardon: And it's just like a really- it's actually kind of helped us to move forward a lot more quickly. The trouble with adding features to something that has bugs or with bugs in it is that sometimes these bugs can be like have really deep causes. Yeah. And if you're building on top of something that actually is broken, like you may end up having to do a ton of rework. And so by keeping the quality bar really high, I think it's enabled us to move a lot more quickly than if we hadn't done that.

[00:31:14] Michael Chan: Yeah, well, that's a really cool idea. I love that idea of making sure that the health of the project, the health of the team is really focused on keeping it good at its core instead of just kind of adding features that make it make it more popular. So I have a few questions in closing. What projects are you watching actively that kind of inspire you or give you ideas? For uh for React Beautiful DND, um or you're just really excited about?

[00:31:44] Alex Reardon: Yeah, there's so many projects I'm excited about. I think being more involved in the open source space, I just see how many amazing engineers there are all over the world just doing crazy, crazy impressive things that I just do not feel capable of even beginning to understand. Like, and one I think about more often than not at the moment is browsers. Like, it sounds really strange, but browsers are insane. They're so complicated. Yeah. And there's so much- the API surface area is just incredible. And these engineers just somehow make it better like all the time. So yeah, I've been thinking about that. I know that's not a specific person. I've got like lots of different projects that I'm just- I'll just maybe I'll just shotgun some that I think I'm just so blown away by all the time. So things like um Jest, JS DOM, Prettier, Flowtype, React, obviously, AtlasKit, the one that we work on. A few people internally like work on some really interesting stuff that I'm pretty excited about. So Ben Connolly with CodeSandbox, Jed Watson and Joss Mackerson working on React-select version 2, and Thinkmill working on a new version of Keystone. And like outside of React, um, I work on a team with an absolute legend called Trey Stewart, and he works on a library called Skate.js, which is a web component library.

[00:32:58] Michael Chan: Oh, cool.

[00:33:00] Alex Reardon: Yeah, and that's just- it's just- he just does incredible work in that space. Um, yeah, so I know that was a bit of a shotgun. There's so many more as well. It's just we lean on, I think, as engineers, just a plethora of amazing libraries these days. It's- I don't particularly follow anyone in in in in particular. I think like Downshift is doing some really cool things. Pretty much anything that uses render props, I'm like, that is cool, I want to learn more about that. Um, and I I think I'm very lucky coming to drag and drop like fairly late in some senses. So there's just a lot of prior work. There's like going all the way back to like jQuery UI, there and then there's like Dragular, and then there's there's like 10+ really good drag and drop libraries out there. So anytime we're looking to do something new, it's like, oh cool, we can just like look at these other ones and how they've done it. So that just makes it just infinitely easier because we can go, oh, like, does that make sense? Like, let's refine that rather than how are you even gonna do this like at all? And even in React, like, there's a few drag and drop libraries that we've been able to sort of learn learn from as well.

[00:34:05] Michael Chan: Well, that's that's awesome. I'm I'm really happy that you're able to share all that with us. Um, where can people find you?

[00:34:11] Alex Reardon: Yeah, so the best place to find me is on Twitter. I have an incredibly long handle. It's @alexandrearden. Uh, hopefully you'll link it in the show notes. Yeah, I definitely will. I was super late to the party with Twitter, so I think my username is the maximum allowed. Allowable characters. Uh, but yeah, that's where you can find me, and I kind of uh tweet there about uh musings about kind of performance, uh and engineering kind of philosophy, and also some of the stuff I'm working on.

[00:34:36] Michael Chan: Awesome. And you had mentioned a few blog posts. Are those on Medium or your personal site?

[00:34:40] Alex Reardon: Yeah, they're they're all on Medium. So if you're interested in in React performance and kind of going a bit deeper, you can kind of follow my journey there. I think I've got about- I think I've got 3 or 4 blog posts specifically about React Performance, uh which can kind of hopefully help you to understand the problem space a bit more and give you some kind of techniques on on things that you could apply. Um definitely some of them are more advanced, so if you're building an app, like maybe some of them aren't for you. I call out the ones that are more advanced, but if you're working on libraries, like there's some stuff in there that can be quite helpful helpful for you.

[00:35:12] Michael Chan: Well, I really appreciate that, and we'll definitely link those blog posts in the show notes. Uh any parting wisdom for us?

[00:35:19] Alex Reardon: Yeah, I got 2, 2, 2, 2 pieces of wisdom. Uh, one is like APIs are important. I was really lucky with React-Beautiful-DnD. It's actually kind of the third rewrite of the same problem space, and I had the experience of building it a few times to sort of see what, what worked. Um, I think there's a lot to be said for like taking a bit of time to think about what an API is for any given project. Uh, that's sort of one, one thing. And the other thing is Working in open source kind of almost for a whole year now, kind of full-time, it's just sort of opened my eyes to how many people just contribute so much of their lives to make other people's lives better. Like, we just need to be, I think, so thankful for all these people who just put in all this incredible effort. I think it's really easy to be very entitled or very dismissive of projects or anything like that, but I think I've just been learning that you know, we just need to be so gracious with these people who just sort of give us this software for free. Um, and I'm just so thankful. I'm just so thankful for all these projects. Even if you don't use a project anymore, like chances are the project that you're using is standing on the shoulders of another one that you might think is not not so hot, crash hot anymore.

[00:36:29] Michael Chan: Awesome. Well, thank you so much for taking your time to be on the show. Uh, we really look forward to the things that you're gonna be putting into uh React Beautiful. D&D, and uh we'll continue to watch the project. Thanks so much.