chantastic.fm

11: Inside React with Sophie Alpert

Episode 11 · May 29, 2018 · 00:41:33

Hosted by Michael Jackson and chantastic · With Sophie Alpert

Download MP3 · Jump to transcript

Sophie Alpert is a core contributor to React and is currently the engineering manager for the React team at Facebook. She has been contributing to React for over 3 years now, making her first contributions while she was working as an engineer at Khan Academy.

Featuring

Links

Transcript

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

[00:00:35] Sophie Alpert: Hello, everyone.

[00:00:36] Michael Jackson: And we have a very special guest with us this week, Sophie Alpert, who is the engineering manager for React at Facebook.

[00:00:46] Sophie Alpert: Hi, it's great to be here.

[00:00:48] Michael Jackson: Thank you so much for joining us on the show this week, Sophie. Now, are you uh are are you at work right now?

[00:00:54] Sophie Alpert: Yeah, I am. I'm in a I'm in a conference room uh with a name from- it's a Seinfeld reference, I think, although I don't follow Seinfeld, so I don't get any of them. But you know, we we name our conference rooms fun things, and I guess people thought this was fun.

[00:01:09] Michael Jackson: Well, are you in the new building?

[00:01:12] Sophie Alpert: Um, we have a lot of buildings. Uh, right right now I work in uh what we call Building 23, which I guess is the 23rd building, but from by some count, although we don't have any buildings less than 10. But uh, but I'm I'm I'm moving in a couple of weeks to a newer new building that's about to open.

[00:01:32] Michael Jackson: Now, does the does the whole React team sit together in Building 23 right now?

[00:01:37] Sophie Alpert: Yeah, well, the folks of us who are in the US do. Um, we we also have 2 in London and they sit in London.

[00:01:45] Michael Jackson: That's right. So how how many uh how many people now on the React team these days?

[00:01:50] Sophie Alpert: Yeah, so uh the React core team is what we uh what we call my team. That's uh me plus uh 6 other people. So 4 here in California and 4- sorry, 2 in London. And uh we're responsible for what you think of as React and ReactDOM. And so that's basically all of the uh the entire web version of React as well as the parts of React that are shared between uh web and native. Um there we do have a separate React Native team that I'm not counting and also a team that works on uh Relay and some of our other

[00:02:26] Michael Jackson: And that's your full-time job, is that right? To work on React and bring us all joy and happiness?

[00:02:32] Sophie Alpert: Yeah, the the 7 of us, we we just uh work on making your life better.

[00:02:37] Michael Jackson: Yeah, that's that's awesome. You know, I saw on your um I saw on your on your website, sophiebits.com— by the way, uh Sophie is Sophie Bits on pretty much anywhere you go, on Twitter, GitHub, um and and she also has this website, sophiebits.com. She says, "I'm a software engineer. I build things to help people." Uh, and I thought that was a pretty cool way to describe uh what you do. You haven't always been at Facebook, Sophie. You used to be at Khan Academy. And in fact, that's when I first met you. Um, in fact, when I first got into React, uh, you were already there. And you had been there for a long time. Can you tell us a little bit about uh when you first kind of started working with with React and when you first discovered it?

[00:03:25] Sophie Alpert: Yeah, so at the time I was working at Khan Academy. Um it's uh it's an educational nonprofit uh if if you're not familiar. And uh I was working on this interactive math question editor uh where you can build your own math questions. And um and at the time I was Building it in Backbone with a bunch of Backbone views and uh struggling a little bit because it was a a pretty complex project and I uh you know couldn't make everything fit together all the time. Um but then uh React came out. I I I remember I saw it on on Hacker News, I believe. This was in in uh the end of May in 2013, so almost 5 years ago. Uh we're we're a couple of weeks short of React's 5-year birthday. Uh in in open source at least. And and I looked at React and it just seemed like uh absolutely perfect fit for the project that I was working on. And so I went home that weekend and rewrote all of my code in React and and it ended up uh being faster, less code, and easier to understand. Mm-hm. And so I looked at it and I was like, well, may maybe there's something here. And ended up uh deploying that to production about a week later. So, something like 10 days after React was open sourced, uh I had it running in production, which in hindsight is uh is a bit ludicrous, um and I maybe not the the best decision, um but uh it it worked out great.

[00:05:05] Michael Jackson: I'm gonna use another word for that. How about Awesome.

[00:05:08] Michael Chan: That is pretty amazing.

[00:05:09] Sophie Alpert: I mean, at the time, I was super excited by React because it seemed so great. I you know I I read all the docs in one night and then I there there weren't very many docs at the time and I was like, I still don't really get what's happening. And then I read all the source code, um which there was also a lot less of at the time, and was like, you know, I think there's there there's something here. And and I I I really just jumped on it. Um but uh yeah, in in in retrospect, I'm like, did I really deploy that to production less than 2 weeks after it was released? And the answer is yes.

[00:05:40] Michael Chan: As as someone who's now managing that project, um do you do you kind of go back to those those memories of your early experiences um making uh Khan Academy, um in in like thinking in in making decisions for kind of the product that is uh React and React DOM?

[00:05:59] Sophie Alpert: Absolutely. One of the most important things when doing the job that I do is to think about the experience that people actually using React and building these products are going to have. Because basically on the React team, our goal is to make it easier to build high-quality user interfaces, and it's a lot easier to do that if you know what building, you know, what building user interfaces is like. Um, and so for that reason, basically everybody we have working on on React and has built products before, because, you know, it's it it it's really helpful to have that that experience. And so, we're we're always trying to look at uh finding ways to, you know, make make make it easier and uh take, you know, things that might be challenging today and make make them a lot simpler. And, you know, that that can come down down in a lot of ways. Um, you know, it can be uh making React run faster so that your apps are more performant, or it can be building better debugging tools so that when your your apps fall apart, you can figure out why quicker.

[00:07:11] Michael Jackson: Now, can you describe a little bit about what kind of the dynamic is like uh on the React team? I know I know a few uh people on the React team. I don't I haven't met everybody, um but I met most of the people. I saw Andrew, I think it was Andrew, no, it was Brian the other night who tweeted something about how you all went out to dinner to together, and he was just like, "Oh, you know, like, it was great," you know, and then uh and then I saw quite a bit of uh joking going back going back and forth. Is that is it is it generally a a pretty pretty kind of— I mean, it seems like a pretty fun team to work on.

[00:07:54] Sophie Alpert: Yeah, I think so. You know, we we try to keep it it pretty lighthearted, and and we we all get get along pretty well, and so um you know you'll you'll often finding find us teasing each other a little bit.

[00:08:06] Michael Chan: I did notice that on Twitter, there's a was it @ACDexplained? Is that?

[00:08:11] Sophie Alpert: Uh-huh. I think it's just @ACDexplained.

[00:08:14] Michael Chan: Okay, yeah, that's right.

[00:08:15] Sophie Alpert: Yeah. Um yeah, that that's a Twitter account. Um I think it's not a secret who the creator is, but I I won't give it away just in case it is. But uh you know it's a you know Andrew likes to make these uh somewhat clever jokes sometimes, and so uh so another member of our team made uh made acd-explained to help explain Andrew's jokes when they're when they're a little bit too cryptic.

[00:08:41] Michael Chan: It's really amazing. I've I've very much enjoyed that addition to the uh the React conversation.

[00:08:48] Michael Jackson: So you've been working on React now at uh Facebook for about, I think it's maybe about 2 years?

[00:08:56] Sophie Alpert: Um, it's over 3, actually.

[00:08:58] Michael Jackson: Oh, geez. Wow. I I remember one of the first things- so you but but but you were contributing to React even before uh even before you went to Facebook. I mean, you were you were using React at Khan Academy, but you were actually contributing um real code, which is, I think, why it made made sense, you know, to to kind of segue into the position that you are that you're in now at Facebook.

[00:09:20] Sophie Alpert: Yeah, so I told you that, you know, in like June of 2013 when React was released, I I began to use it and then uh very shortly after that I began to hang out in the the chat room they had for uh people interested in React and and and also ended up running into a few bugs in in React at the time because it was obviously a much newer project and um ended up contributing back bug fixes and working on on larger and larger things over time. And eventually, by the end of 2014, I I found that I was spending most of my spare time on on React and and and really figured that it was it was time to just come work on it full-time.

[00:10:01] Michael Chan: So I I have a question with regard to that. If if someone was uh kind of wanting to carve out the same you know path towards kind of full-time React development that you were uh able to take, what would you what would you recommend for them? Like what what does that look like? Uh 3.5 years later?

[00:10:19] Sophie Alpert: React is a much more mature project now, and so that means that there are a lot fewer uh easy opportunities to contribute to the project versus when when I was starting, there were there were so so many things that needed fixing and so so many features that didn't exist yet that it was it was pretty easy to just look and and see gaps, whereas now um we have uh what we think is a pretty cohesive set of features. Um, and we also have our own idea of what we're trying to get to with the project and where where we're trying to take it. And that that actually does mean that it's harder to end up contributing to it, especially as somebody who's uh you know not completely steeped in all of our plans and things like that. That said, we do uh you know we love having open source contributors. We have We file GitHub issues now and then and label them, good first issue, I think is the name of the tag. And those are are issues that can can really help us, but hopefully don't require a ton of context about about React that most people won't have. And so we we try to explain it so that some somebody who's interested in the project can get started.

[00:11:34] Michael Chan: That's interesting. So how has your uh your experience been kind of transitioning from from products at Khan Academy to- or like a user-facing product to a product that is kind of a platform or a tool for people to build their applications on. Did a lot of those skills transfer over, or has it been a totally new set of skills that you've had to learn and get good at?

[00:11:59] Sophie Alpert: For the most part, the skills overlap a lot. You know, I'm still developing JavaScript on the web in some sense, and uh still need to know a lot of the same things that you would need to know for uh for for building any user interface. But uh certainly the the exact balance of how things fit together is is a little bit different. We end up doing, you know, more more algorithmic work and things like that uh while while developing React itself because we want to make sure it's as optimized as we can make it.

[00:12:31] Michael Jackson: From what I understand, uh React itself though is kind of treated as a product within the larger Facebook org, right? It's uh your your customers aren't uh you know really like the uh the end users of Facebook.com, but your customers are more like other engineering teams uh at Facebook itself.

[00:12:54] Sophie Alpert: Yeah, that that's absolutely right. And so then when making decisions about what we want to work on, we need to take into account that— uh you know we we need to make sure that we're solving the use cases that these teams have. And we need to ideally make it so that they want to use React because um you know we're we're we're not in any position to force them to use it if they don't want to. And so, you know, if we think we have something to offer them, then it's it's sort of on us to convince them of that.

[00:13:24] Michael Jackson: Do you get any kinds of competition from other teams inside Facebook who are like, ah, my thing is way cooler than React, you should use my thing instead? Does that happen?

[00:13:35] Sophie Alpert: Uh, remarkably, we haven't run into that very much on on the web. React is powering almost all of our our interfaces. Um, you know, we do have some cases where we're actually using older technologies uh for various reasons, like a lot of our homepage is still server-driven, but I wouldn't say that we we really have any like React competitors that are uh trying to to displace React. Um, most of that competition actually comes from externally.

[00:14:03] Michael Jackson: So, um, yeah, so the external competition would be, I guess, other kinds of JavaScript frameworks, right? You know, whatever, whatever other people are doing. And in that case, it's it's not really like— I I I wouldn't exactly word it as like competition. It's more like— I guess it's more like R&D, it seems like.

[00:14:22] Sophie Alpert: Yeah, you're you're absolutely right. We, you know, I I I did say competition, but we we try to be very friendly with with all of the other frameworks that are trying to solve problems in the same space because you know we're trying to solve a lot of the same problems as they are and it's helpful for us to just have a collaborative atmosphere and I don't wanna you know I don't wanna fight anybody here. And so um you know like actually Facebook sponsors a couple other uh projects that you might consider to be quote unquote React competitors because you know we we really do want to to encourage those projects to grow and to to innovate because uh we we can all learn from each other.

[00:15:00] Michael Chan: This is something that's that that has always been attractive to me about the React community, even from the very beginning. I feel like some frameworks have really kind of tried to make the story about competition and like, you know, they do this, we do this thing better, they do this, we do this thing, you know, in a better way, and have that be the story of their framework. And I've always loved um kind of the spirit of React, which is this is the thing that works for us, it's the thing that works for facebook.com. Um, we enjoy it, we have put, you know, some of our— we've put great engineers behind it, we believe in it, we want to push it forward, and hopefully it's useful to you as well. Um, but other people are doing great work, and we're going to borrow from that and kind of, uh, you know, hopefully what we've done can be adopted into those frameworks as well. And I just, I I guess this is more just a statement, but I've always appreciated and um enjoyed the spirit that you're talking about, that um kind of friendly, uh maybe slightly competitive, but like with a spirit of, hey, we're all in this together, um just trying to move things forward and uh learn from each other. So congratulations on doing that well.

[00:16:16] Sophie Alpert: Well, thank you. I, you know, one thing I like to look at for inspiration is uh back uh a decade or more ago, uh you would have the Netscape and IE teams, I believe, sending sending each other cakes uh when they had major version releases, or it might have been Firefox and IE. Um, even though, you know, those browsers were so often pitted against each other, um, but but under all of that, there was this camaraderie.

[00:16:44] Michael Jackson: I remember that. I remember seeing some pictures of cakes. I think I saw like a Firefox cake one time. I'm pretty sure we could uh could pull up some pictures of that online without uh without too much trouble. So help me understand, what is it like for a for a a day in the life of of a a core React engineer at Facebook? Um it's it's my understanding that uh that a lot of the work at Facebook, uh for example, you know, a lot of products obviously are built in React, and that when React itself uh changes, that the React engineers are responsible for uh actually going and and make sure that the product teams not only know about those changes, but actually are making commits on other products to help them uh to to keep their code up to date with those changes. Is that right? This is, I think, why there are a lot of the um you know the code mods and things like like what Christophe does. Is that right?

[00:17:45] Sophie Alpert: At Facebook, we have over 50,000 React components in our codebase. We also use a single version of React across all of them. It's it it's a monorepo, a single stack for all of our websites. And this means that it's a lot easier to make sweeping changes to the codebase because you can you know you can update all of it in a single commit. Um however, it also means That in order for us to upgrade React, we need to make sure that nobody's relying on something that that doesn't work in the new version. And so, yeah, it's it's basically on us to make sure that when we make breaking changes to React, we're not breaking anybody's code because, you know, if we did, then that's that's sort of on us. If you know, if people can't interact with their friends on Facebook, that's that's not not what we want to make happen. And so, um, so our team basically is responsible for uh figuring out how to bring everybody along on this journey when we make breaking changes. And so, this is actually something that a lot of people don't realize about our team, but we spend uh a huge amount of time working on these migration strategies to figure out, you know, how we can do these breaking changes gradually, how we can get people to move on to the the newest APIs. And in in a lot of cases, we can do it in some sort of automated way if we can write a script to to rewrite people's components. Uh the the most sophisticated example of that um was when we converted from React.createClass to ES6 classes, and we we open sourced uh that that script a couple years ago. That's the sort of thing that really helps us not get left behind. And then it it it it's also good practice for us because if our team of 7 people is responsible for upgrading these 50,000 components to work with the the newest version of React, then it probably means that that any other company is also going to be able to to upgrade to the latest version as well.

[00:19:52] Michael Chan: In your experience with that, what have been some of the most uh winning strategies or lessons that you learned the hard way that are like now part of every pre-release checklist?

[00:20:03] Sophie Alpert: The biggest thing we've done actually is automating as much as we can because it just makes it so much easier to make progress. So we have must be thousands of automated tests for React that capture as much as we can for all of the core behaviors of React. We add a test whenever there's any sort of regression to make sure it it never happens again. And uh we like we were actually able to use this test suite when we rewrote all of React last year to make sure that the the new version was basically completely compatible with the old version. We also recently worked on an automated release script where you know we can run the tests and push everything to npm. We have a whole bunch of packages and tag it and put it on Bower, I think, and we have You know, it there there's quite quite a number of steps to a release, and and it actually used to take us uh a few hours to do a release. Now now you can do one in like 10 minutes.

[00:21:03] Michael Jackson: I'm glad you mentioned the uh the rewrite of React uh that happened last year. For for anybody who's not familiar with that, the the uh React 16 release uh is uh was a was a pretty vast departure internally. from what was what was previously done. In fact, you, Sophie, wrote a post on the uh on the Facebook Code blog uh last uh last towards the end of last year. You said uh an API-compatible, that's React 16 was an API-compatible rewrite of our frontend library. You described it like uh you described it like replacing the engine of a running car. So here you are cruising down cruising down the road, And uh somebody hops out the uh hops out the window onto the hood, they pop it open, and they swap out the engine, and the car is uh the car is still going down. Can can you tell us a little bit about that experience? What was that like, and and and why was the uh why was the rewrite uh something that you determined to do?

[00:22:08] Sophie Alpert: We hit a point where it was getting harder and harder to make changes to React because we had a fair amount of legacy code that was um you know from the the infrastructure that was built up when React was first written. But we had found over time that you know the things that we wanted React to do had changed slightly. And so um we found that it was pretty hard to make some changes that you that you might even think would be simple. Like um one of the features we added in React 16 is fragment support where you can return more than one component from your render method. And this change sounds really simple when you describe it, but it was actually very difficult to make that happen with our old codebase because basically everything assumed that you know that every component would turn into a single node. It would you know when you say, "I want to render this app component," then it would be like, "Well, what is the HTML?" element that that maps to. And so, uh, so in order to break some of those fundamental assumptions, uh, we ended up doing uh uh this large-scale rewrite of almost all of the internals of React.

[00:23:21] Michael Jackson: So how does how did a project like that actually sort of come to pass? You know, I mean, how do you like allocate time for that and determine, okay, who's gonna who's gonna do this? I mean, how do you how do you break down something that big, I guess, into uh I mean, a rewrite of React seems like a a a huge a huge engineering task. I'm sure you'd had you'd had you know a lot of engineering experience you know obviously before that, but but even to me at this point in my career, it seems just like a just like a like a huge task. I don't know I don't even know how I would how I would approach something like that. What can you tell us any anything about the process?

[00:23:59] Sophie Alpert: Yeah, I mean, I I wrote quite a bit about it in my post that you you mentioned on the Facebook Code blog, but Basically, um, you know, I have to give a lot of the credit to Sebastian on our team. He, the rewrite was really his idea and he he planned out the architecture that we ended up with. But, um, once we had an idea of what we were aiming for, it was basically just trying to build it up piece by piece and then and then try to make as many of the tests pass as possible as we were as we were doing that. And so, you know, we started out and I'm sure it was like 2 out of 700 test files passing or something like that. And then, uh and then it was just more, more and more over time. We started out with the, the data structures and then supporting very, very limited use cases. You know, at first I think it did some semblance of an init- of an initial render, but it didn't support setState, it didn't support anything like that. And, uh just, just gradually added all the features back. I,

[00:25:03] Michael Jackson: I remember following along actually watching the tests, uh you know, watching the isfiberreadyyet.com com slowly go green over the course of like several months. Uh, that was pretty cool. Are are uh a lot of the— uh I I've looked through the the Facebook— uh or sorry, it's the React codebase, not obviously not as much as you have, but I've looked through there and I've noticed that a lot of the tests, um not not all of them, but a lot of them are written, you know, using the public API, which is uh totally awesome and allows you to do stuff like that, right? Yeah. Because if it's all written using internal API, then you basically just have to throw all those tests away in a situation like that.

[00:25:41] Sophie Alpert: Yeah, and that that's a big thing that we actually learned while doing this rewrite. A fair number of our tests uh at the time were testing these internal modules where when we had written the test, we had said, oh yeah, of course we're gonna keep using this module forever. And then and then it just came to light that that was simply not true. And so we needed to convert a lot of those tests to be uh based on the public API. Um but in turn, you know, we we have been able to do that uh with the rewrite to make sure that both versions of React pass all the same tests. And then another thing that we recently did that was enabled by this was uh running the majority of our tests against the actual built bundles versus Previously, we were requiring a bunch of internal modules directly, and um now now we are actually able to run like 90% of our tests against the exact bundles that we ship to npm and that we we use at Facebook, and to make sure that nothing in our packaging process actually even introduces any issues, because uh we have uh a a a build process that is is more elaborate than I think we'd like it to be, but uh we we need to support uh a lot of different use cases and certain files are replaced in certain build configurations and things like that. So.

[00:27:10] Michael Chan: I I feel like there was an article written about this, maybe on the React blog?

[00:27:15] Sophie Alpert: Yeah, that's true. Um Dan Abramov wrote a post um at the end of last year, I think, uh probably in November or December, um called Improving the Repository Infrastructure. It's on our blog and he talked about a lot of these improvements we did, including running the tests against the bundles and the automated release script that I mentioned earlier.

[00:27:35] Michael Chan: Yeah, I feel like that's a really helpful resource, um, you know, for people who are just getting into uh open source and testing in general. It really laid out a lot of the things that that you all had learned, and um, it it does seem like lessons that a lot of people have to learn on their own, and it really is nice to see them all documented in that in that one spot for a really big project.

[00:27:59] Michael Jackson: Oh man, it's it's a helpful lesson for me to learn. I've got a bug right now on on on the React Router website that is not present in development, um that is only present after the build has run and the thing is shipped to production. And and I'm like, I'm listening to this conversation, I'm like, maybe I should be doing some of that sort of like end-to-end, you know, here's the final bundle, okay, now run your tests.

[00:28:27] Sophie Alpert: Yeah, running tests on the production version of React is also something we we learned. You know, we have two two versions of React where the the development one has more warnings and it does like PropTypes checking, which we actually skip in production. And uh we were running most of our tests against the development builds because we had to assert that certain warnings get fired and things like that. But there were some cases where we would mess up and the dev build would work fine and the production build would be broken and then our tests wouldn't wouldn't catch it. And so, we we also ended up rewriting our tests so that we so that we can run them against the production builds. And then for the tests that are verifying that a certain warning is logged, then we just say, oh, well, we don't expect that warning to be logged in production, but we expect everything else to be exactly the same.

[00:29:16] Michael Jackson: You said your build process is a little more complex than you'd like. What are you using for the uh for the build at at Facebook? I mean I mean I'm sure there are like multiple steps and multiple things involved, but what does it generally kind of look like?

[00:29:29] Sophie Alpert: So for React itself, a lot of it is custom. We actually have our own build scripts inside the React repo, um and uh a fair amount of them are custom. We also do make use of Rollup as our bundler and um Google Closure Compiler uh to minify the code after after it's bundled together. But um we also have we we have a lot of custom logic because certain certain things behave differently in certain environments. There's uh there's some files where we want to fork their behavior when running in React Native and things like that. And so, there there there's quite an elaborate process.

[00:30:11] Michael Jackson: Okay. So, uh I would like to spend just a little bit of time talking about, you know, stuff that, you know, just talking about the future, talking about stuff that you're anticipating, stuff that uh stuff that you're excited about. Obviously, we've had Uh, we've had both Dan and Andrew on the podcast in the last couple of months. Uh, we had Dan on uh literally the week before he went up and uh gave his talk at uh JSConf Iceland. Uh, and then we had Andrew on a couple of weeks after that. And and we've talked a little bit about the async React. Um, I I assume you're anticipating that, you're excited about that. Uh, how's how's that work coming along uh internally at Facebook?

[00:30:54] Sophie Alpert: You know, it's going really well. Um, with everything we release on React, we want to try to test it ourselves first to make sure that it's good, because we don't want to release something and have a lot of people jump on it and be really excited for it and then find out that it it doesn't really work as well as we we thought it would work. And and that that that's one of the advantages we have of actually developing something like this at Facebook is You know, we we operate at a pretty large scale, and so we can make sure that whatever features we have work uh work at that scale. Um and so right now, we are running our first production tests of these async rendering capabilities, uh trying to see how how they behave in in the real world on on real components. And Um, the the results aren't quite in yet, but hopefully hopefully they'll they'll look good and then hopefully we can get these capabilities out so that other people can use them as well. Um, however, uh the the version of React that we run at Facebook is always trailing what we have on GitHub. Uh we we sync in the master branch from GitHub to our internal repos about once every week or two. And so all of these uh capabilities that we're testing are actually already on GitHub, they're they're just disabled in in most of the build configurations because we're not quite ready to have people use them. But if you're really adventurous, you can go find them there.

[00:32:29] Michael Jackson: Oh, so you don't you don't actually run a specific version of React at GitHub, you run more like a SHA. Like uh you know like if you're if you're doing it every couple of weeks, I don't. I don't think releases happen that often, do they?

[00:32:44] Sophie Alpert: No, they they don't. And so, yeah, we whenever we run our sync script to import the latest version of React, it just grabs whatever's on master at that time.

[00:32:54] Michael Jackson: That's so awesome. It's like living, breathing software, you know? It's not like, oh, this is software at such and such a version. It's like, oh yeah, whatever's on master, let's run that.

[00:33:05] Michael Chan: Feels almost like those early days at uh Khan Academy, just uh shipping React 2 weeks after you uh Yeah, a little bit like that.

[00:33:13] Michael Jackson: There was just one more topic that I wanted to touch on. And uh thank you, by the way, for for sharing everything that you have with us about about React. Um and this is a a topic that I think is uh is important for a lot of people to you know that are hearing this podcast and in this industry to understand um and and and have some understanding for. So, Sophie, last year, Uh, or was it- no, it wasn't last year at all, it was earlier. Oh no, it was last year. It was in August of last year, the the the blog post that you had um on your blog where you said, "Hi, I'm trans." And uh and you said, you know, that that you'd known for a long time that, you know, if if somebody gave you the choice, um, you know, that that you would choose to be a woman, that that um that this was something that you'd felt for a long time. And and so at a at a certain point you made the decision. You said, "I'm I'm I'm going to transition." And, you know, one of the things that really affected me uh uh personally about that post is you talked about how, you know, about 50% of people who who experience uh gender dysphoria, which is the clinical term for for people who uh don't identify with uh with the gender that their that their body is uh attempt suicide. And uh as somebody who who kind of you know struggles with mental illness, I've I've written about it on you know various occasions, uh that that that number really, really uh really shocked me and and really uh really broke my heart. So I wanted to give uh give you a chance and and uh and uh just to just to maybe remind us all a little bit about- What we can do um as as people, as individuals in our in our communities and as part of the React community to help and to be more inclusive. Uh what are things that we can do to to help people who are um who who might feel out of place because they uh because you know they they have this they struggle with this.

[00:35:28] Sophie Alpert: You uh you cited that 50% number, 50% of people who are trans end up committing suicide or attempting to commit suicide uh at some point in their their lives. And um the thing that I forgot to mention in that post and probably should have is that um the overwhelming majority of those people are people who don't get the chance to transition. people who aren't able to to live out who they really are, um and and face uh um or people who who face you know various uh various aspects of of discrimination in the course of of doing so. Um and so the biggest thing that I can ask for is just for people to uh try to be welcoming to people who you know, might not behave, you know, might not dress the same way that you're used to, or might not uh present themselves the the same way as you're used to, and and understand that, um, you know, sort of the the way they choose to to present is is not really any of your business, it's it's their business. And um, and also try to just have some empathy for people who are going through uh a difficult process. I I remember actually, um, At React Conf last year, that was probably in March if I remember right, I was on a Q&A panel at near the end of the conference and I remember I had, that this was before I transitioned and and but before I I came out publicly. And I I remember I was wearing nail polish uh when I was on that panel and then when I was looking at the the YouTube video of that panel later, I I saw a comment uh that said, I think, "What's with the nail polish? Is this a freak show or something?" And I deleted that comment um and turned off comments, which we had intended to do on all of our videos actually. Um so so you won't won't see it there if you look now, but that that comment was pretty demoralizing for me.

[00:37:46] Michael Chan: Yeah.

[00:37:47] Sophie Alpert: As you know, somebody who is trying to to find herself. Um, and I, you know, I I clearly I I made it past that and I'm I'm still around. Um, and I'm I'm I'm actually very happy living as a woman now, which which I've I've been able to do.

[00:38:04] Michael Jackson: I thank you so much for uh for taking the time to speak to that to that question. I know that's uh it's not a React question, It's more just a a a people question and it's a it's a it's uh you know being nice and being respectful to people, which, you know, the more I the more software that I do, uh the more I learn and understand that it really is just about people. I feel like software sometimes is kind of a uh it's the it's the medium, you know, that we we write code, but it you know. Sharing code and sharing thoughts about code and and talking about code and giving conference talks. Uh it really is just about connecting people and helping people. And uh and so uh so I thank you for taking the taking the time to uh to talk about that here on the podcast.

[00:38:56] Sophie Alpert: Thank you too.

[00:38:57] Michael Chan: I have a question if if that's all right.

[00:38:59] Sophie Alpert: Go ahead.

[00:39:00] Michael Chan: So I have I have two kids, uh Rock and Ruby, and they're what, 4 and 7, I think, going on 5 and 8. And I'm just wondering, like, as a as a parent of, you know, of of 2 kids, what's what's the best way to, I guess, leave that leave that conversational door open for my kids?

[00:39:20] Sophie Alpert: You know, I think the biggest thing you can do is to just explain things to them and explain that You know, this is how people are, you know, in in the same way where, um, you know, if your kids see a gay couple and ask like, oh, what like what's with that? What does that mean? You know, there there's two ways you can react to that. You can either, uh, you can just say like, it's just two men who love each other, or two two women who love each other. And if you say that, then kids will probably just say, oh, cool. And then move on to the next thing because you know they're not born with these prejudices that uh that we we have as adults. Um and so um that's really the the same thing you have to do for for anything like this. And you know I have some friends who who are trans who've talked to kids and um you know like what one friend of mine said um said like, I used to be a girl, but I took a magic potion that turned me into to a boy 'cause I wanted to be a boy. And the the kids thought that that was like so cool. And um you know you'll just just opening these doors to make sure that people know that this is even a possibility uh will help them help them find themselves. I mean you know most people in this world aren't trans, and so statistically your kids probably aren't trans, but uh for the case that they are, you know you you want to be You want to be there and you want to be supportive for that because uh when when you're not, I think that that's where we we get into those statistics we mentioned earlier.

[00:41:03] Michael Chan: Oh, absolutely. Well, thank you for that.

[00:41:05] Michael Jackson: Okay, so Sophiebits, uh twitter.com/sophiebits, github.com/sophiebits, sophiebits.com. Thank you so much for joining us, Sophie Alpert, and we will see y'all next week on the React Podcast.