8: React Perf Devtool with Nitin Tulswani
Nitin Tulswani is a prolific developer and the creator of react-perf-devtool, a library that helps with profiling the performance of your React components since react-addons-perf was deprecated in React 16. In this episode we discuss Nitin's approach to writing code and the motivation behind several of his open source projects.
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. And I am joined by a very special guest today, Mr. Nitin Tulswani.
[00:00:37] Nitin Tulswani: Hi, everyone. How's it going?
[00:00:39] Michael Jackson: And and uh you, I I was looking you up on the map, sir. You live in northern India, is that right? Like the northwestern part?
[00:00:49] Nitin Tulswani: Actually, I am originally from Rajasthan, but I study in North India.
[00:00:53] Michael Jackson: Awesome. Yeah, I just uh I just looked you up on your on your GitHub profile. So what We are we are miles and miles and miles apart right now, which is awesome that uh that we're here talking on this podcast. Could you tell us, uh first of all, so you obviously have been doing uh so many different things with React. Um I I I've never met you personally in in in person, but I've definitely heard of your work. You've had a lot of uh you know different open source stuff that you've been publishing. Um, could you tell us, could you tell us a little bit about your background? Like what are you, you know, what are maybe some some places that you've worked in the past or things, projects that you've worked on in the past? Um, we'll we'll get to all of your current open source stuff right now, but I'm just curious, what what is your background? What have you done with your in in uh in the past in your career?
[00:01:44] Nitin Tulswani: Sure, so it's gonna be a little surprising. Uh, actually, I'm originally from Rajasthan, India. I studied forensics and computer security. I know it's weird because it's irrelevant to the work that I do most of the time, which is authoring tools and libraries for web and doing a bunch of weird stuff in between. Uh, I was introduced to- actually, I've just completed my college last week, so I'm looking for work, full-time work.
[00:02:13] Michael Jackson: Congrats, that's huge. I remember my last day of college. Um, I remember I went home and I like sat on the couch and I just and I just breathed this huge sigh of relief because I was so happy to finally- I never had to write a paper again. I never had to like do any homework and stuff.
[00:02:35] Nitin Tulswani: Exactly, same feelings.
[00:02:36] Michael Jackson: That's awesome. Congratulations.
[00:02:38] Nitin Tulswani: Yeah, thank you so much. Yeah, I was introduced to programming when I was in school. At that time, I just studied algorithms and just academic stuff and didn't do much And then I started learning React when I first started my semester. I took this free introductory course by Tyler McGinnis, if I'm pronouncing it right.
[00:02:58] Michael Jackson: Yeah.
[00:02:58] Nitin Tulswani: To learn what is React and how to configure build tools in order to use React. So I started creating some basic web applications to learn the fundamentals and to develop the mental model. I felt that the experience with React was awesome and it was more easy to catch when compared to other frameworks. No offense. At that time, the experience was obnoxious with other frameworks, not with React. So during my sophomore year in college, I was introduced to open source by one of my friends. I learned the basics of Git and version control through this. I had courses by Kent C. Dodds on how to do open source. It was awesome, by the way, and it helped me a lot. Then I jumped directly to the train and submitted my first PR to actually a very cool library by Socratic, which is a company based in New York. Uh, the library is called MathSteps. It's it's it's a library, so you can like give an input equation and it will give you a series of steps to solve an equation. So yeah, uh, I then started working on demo for their library. The overall experience was good, maybe due to the maintainer. It was a boost for me. So yeah, it was a cool experience. Afterwards, I started looking at some issues and then eventually that led me to contribute to Glamorous by PayPal, if you know.
[00:04:21] Michael Jackson: Absolutely, yep.
[00:04:21] Nitin Tulswani: Yeah, so I started creating some editor plugins for the library and also a cool package around the Glimmer. So you you'll be able to style and render primitives across multiple targets like iOS, Android, and web, and even Sketch with with same code. So you just write code once and you can render it across multiple targets. It was using React Primitives behind the scene.
[00:04:44] Michael Jackson: And that's uh that the are you talking about the React Primitives project by Leland Richardson?
[00:04:49] Nitin Tulswani: Exactly, yeah, React Primitives by Leland Richardson.
[00:04:53] Michael Jackson: And so was that the work that you did with Glamorous, was that like uh porting basically the Glamorous API uh to use React Primitives under the hood, behind the scenes?
[00:05:05] Nitin Tulswani: Exactly, exactly. Same thing.
[00:05:07] Michael Jackson: That's that sounds really interesting. I so is that was that work incorporated back into Glamorous itself, or was that your own? Is that are you maintaining that like as your own fork?
[00:05:19] Nitin Tulswani: No, actually I'm maintaining At my own, so it's not put into the Glamorous core. So the core is very minimal, but the ecosystem is vast and rich. So yeah, it's included in the ecosystem.
[00:05:32] Michael Jackson: That's awesome. I I don't I don't think I realized that you had done a lot with uh with styling before. Tell me a little bit about that experience. So you're you you know, you you wanted to take this styling library, you wanted to work across multiple different targets, across web and across native. Um, what are some of the challenges that you that you saw in in that effort?
[00:05:55] Nitin Tulswani: Challenges, maybe um performance issues with objects, maybe. Uh, I uh I don't know much about CSS-in-JS. Um, uh, I saw this tweet by Max Stoiber uh that styled-components now has support for React primitives. So it was interesting because it was something new in CSS-in-JS world. So I started exploring and learned React Primitives, what it's using behind the scene, and and and I came to know that it was using React Native Web. And uh yeah, then I started, yeah, porting porting the styled-components version of React Primitives to the Glamorous version.
[00:06:34] Michael Jackson: We actually had uh we had Nicolas Gallagher on the show just a couple of weeks ago, the the guy who's been doing a lot of the work behind React Native Web. So it's all it's all very kind of related, I guess you could say. That's really cool.
[00:06:48] Nitin Tulswani: Yeah, it's actually a very cool library. You can do a bunch of weird stuff with it.
[00:06:52] Michael Jackson: Yeah, yeah, yeah, absolutely. I I I think the work that he's been doing is very, very interesting. Um, so so you talked a little bit about, you know, some of the concerns with performance, which uh which I've definitely heard Nicholas talk about as well with some of the other You know, kind of uh with you know, when we're talking about CSS-in-JS, performance is is is definitely a concern, especially when you're when you're building uh larger apps. Um, you actually developed a tool called the React Perf DevTool, uh and you tweeted about it last December. I'm looking at the tweet right now. It had over 1,000 likes. And I will I will have you know that I've never had a tweet with over 1,000 likes. So you you beat me. Good job.
[00:07:43] Nitin Tulswani: Yeah.
[00:07:46] Michael Jackson: So it seems like performance is kind of a a hobby of yours. It's kind of something that you you enjoy digging into.
[00:07:51] Nitin Tulswani: No, it's not a hobby. Actually, I was just lurking around the main React monorepo. And there was an issue created related to the performance. The React team was discussing a tool, a create create creating a tool for the community. So it will be easier for them to visualize and inspect the performance of their React components. Initially, some work was done by Will Chin, who works on the Chrome team. So he only had like uh so much of time on his day on his day job. So I asked him, can I work on this tool? Can I extend your work? So he was kind and he told me that, yeah, you you can extend your work on this tool. So I decided to work on React Performance Tool and Yeah, I tweeted about it, the community actually liked it, and yeah, I'm maintaining it right now.
[00:08:44] Michael Jackson: You know, I, that's awesome. I, I actually noticed that in, uh, so in React 15, they used to have something called React Addons Perf, and then that was deprecated in React 16. And the React perf, basically the React docs today, if you go to the React docs and you want to read about performance profiling, they basically just say um use a browser like Chrome or Edge that has support for the user timing API. Um and so does does React uh does React perf dev tool uh rely on the user timing API as well?
[00:09:25] Nitin Tulswani: Yes, it relies on user timing API and it uses performance observer. But it it has one trade-off, which is um with asynchronous React, it won't it won't work with asynchronous React because with async React, everything's gonna change. So it will require a rebuild. So yeah.
[00:09:43] Michael Jackson: What, what specifically do you think is going to have to change about react-perf DevTool once people start doing things asynchronously?
[00:09:51] Nitin Tulswani: Um, maybe parsing and aggregating the measures, which are provided by react-dom bundle. So in React 16, I guess, so uh you have, you had to comment uh one line in react-minified bundle actually. in order to use the dev tool, but with React 16.3, it was all gone. So you can use it tool directly, but with asynchronous React, um, I don't actually remember what Dan Abramov said on the issue, but he told me that uh the way which React collects and aggregate the measure, it's gonna change. So right now I don't know much about that thing. And the team, the React team has some plan. So yeah, maybe I don't know.
[00:10:34] Michael Jackson: Well, it just seems like, you know, when everything is happening sort of synchronously, then you can just sort of take a look. Uh, obviously I haven't done as much work as as you've done. I'm just thinking through what this might be like. But if everything is done synchronously, then you can just sort of take a look at the amount of time that you spend in each uh stage of the lifecycle, and then you can sort of plot it out. But from what I understand about the asynchronous React, Uh something, for example, like the componentWillMount, uh which has actually been been deprecated, or or basically we could say like component instantiation, um you know, might happen a few times. Uh and so, or at least that was that was kind of something that was said in early discussions about Async React. And so anyway, I can imagine it it might be a little bit more difficult to to say definitively, like, this was the render uh that you know rendered this component. Because maybe we had to, maybe it uh you know was needed to fetch some data and then we and before we could render it. So we couldn't, we can't really count the first timing in the uh in the time that it took to render this thing.
[00:11:45] Nitin Tulswani: Exactly, yeah. So I guess it will require a rebuild. But uh one nice thing about this tool is, um you if you have your own analytics service running, And if you're just interested in the measures and not the Chrome developer tools, then it also exposes a hook which you can register in your React app. So with the help of your hook, you can directly collect all the measures and send it to your analytics server and create your own performance dashboard. So it's a good extension.
[00:12:16] Michael Jackson: Oh, that's so nice. I have to admit that when I saw that react-add-ons-pref was deprecated, I was kind of sad because I liked You know, you you could you could you could use that perf module to do that kind of stuff that you're talking about, right?
[00:12:28] Nitin Tulswani: Yeah, it was more much easier with React, adding react-perf to the URL and just seeing the performance of your React application.
[00:12:36] Michael Jackson: So how do you how do you actually use react-perf-devtool? What's the— I I was looking at it and it looks like there's a there's a a registerObserver API. Is this something that we need to uh go ahead and and insert sort of manually into our code, or is it something that can kind of happen automatically?
[00:12:56] Nitin Tulswani: Uh no, you have to manually register the observer so React can send the measure to the developer extension. So I so my tool can collect the performance measure which React uh generates and creates. So yeah, without observer hook, it won't work.
[00:13:13] Michael Jackson: But it seems very, very small though. It's just that it's just that one function. I say register an observer. And I could probably just put that in one place, like up at the top of my app, and then it would measure uh lifecycle from, you know, all the way down. Is that accurate?
[00:13:30] Nitin Tulswani: Yeah, it's accurate. Actually, it hooks an object containing the- basically the observer hooks an object containing information about the events and performance measures of React components to the global state, that is the window object. And then that state can be accessed inside the inspected window, which is the Chrome extension, using eval. So like with every re-render of your app, the object is updated with new measures and event counts. So it all happens like it is as it was synchronous. And the extension takes care of clearing of the memory and also the cache. So it's so fast.
[00:14:04] Michael Jackson: That sounds that sounds excellent. That sounds really, really interesting. I actually uh teach React. Uh that's my job is I I have a company called React Training and I teach.
[00:14:14] Nitin Tulswani: Yeah, I know about React Training.
[00:14:15] Michael Jackson: I'm gonna I'm gonna use this in my workshops. I'm gonna use this. Because I was sad when React Addons Perf was removed. And I was so sad about it. And then uh now that I found this thing, I'm gonna use this in my workshops. So I'm sorry, but you're probably just going to get a lot more traffic and issues and people like saying stuff about it, okay? Is that cool?
[00:14:35] Nitin Tulswani: It's cool. It's awesome.
[00:14:38] Michael Jackson: So you uh you're you're you're a really interesting person to me because you don't just like isolate yourself to like one thing. You you actually have quite a few different React projects uh that you're working on right now. Another one um that I that I think is really interesting is called Animate Components. So these are uh components basically that you can use to model different kinds of animations, like a slide-in animation or a like an appear animation or a drop-in or or flips in or whatever, kind of like uh a lot of the animations, you know, the names of the animations that you might find if you were uh putting together like a Keynote presentation. Was that work inspired by anything that, you know, any project that you were working on, or did you just want to have some fun with animations?
[00:15:30] Nitin Tulswani: No, it was totally inspired by 2 projects actually. Uh one was Animate.css And the other one was by the Formidable team. I don't actually remember the name of the project right now, but yeah, it was totally inspired by those two projects. Uh, but interestingly, this project is going to be deprecated in favor of a new animation library, which which I'm currently working on, which is playback-based animations in React. So, so like, this is going to be deprecated, this package is. Yeah, you can simply uh use CSS instead. And the current version of the animation library I'm working on will extend the work that I did here.
[00:16:12] Michael Jackson: That makes sense. So so is there a lot of stuff that you- what what what did you learn in taking this approach that made you decide, ah, this is probably not not the way that I wanted it to go? And and what are you hoping to fix or do differently basically in the in the in the rewrite, in the new version?
[00:16:34] Nitin Tulswani: In this version, the animate components, um, you- the components don't have playback-based controls. So you cannot stop animation, go back in the timeline, play, restart it again. Or you can control the whole timeline of the animation. For example, uh, controlling the playback rate, setting the current time, setting the speed, or interactively creating animation using callback. Timer APIs, variables. So it lacks those features. So um yeah, so the new project is going to be interesting. I hope so, because there's already a bunch of projects uh created by very smart people, maybe possibly smarter than me. Uh the one project that I really like right now is React Spring. I don't I haven't used it actually in any of my project, but it seems interesting to me and Yeah, I think it's it's the only package that is going to solve the whole animation problems in the React community. So yeah, looking forward to it.
[00:17:35] Michael Jackson: Do you think that maybe there is uh room for for both kinds of libraries, right? So there's one kind of an animation that's like, uh you don't maybe you don't need control over it. Where I tend to see the difference is is with touch. devices, right? So if if somebody's got like a if you know if somebody's got a phone and they're swiping you know left or right or whatever, and they could reverse that uh that motion and then and then you know essentially cancel that action, that's where you need like really fine-grained control over the animation. But then there are other times where, you know, like on desktop, when somebody's just pointing and clicking and they don't have like a fine-grained control over you know, what's going to happen in the animation. And so you you could really just start it playing and let it go to completion, um you know, without that needing the fine-grained control. Do you think there there could be room for for both kinds of libraries out there?
[00:18:34] Nitin Tulswani: I don't think so, because uh other libraries focus more more on the interaction and the user-specific needs. But this library, which I'm working on, it actually provides utilities to create animation tools. in-browser animation tools. So, and also provides APIs for composing animations. So you can transition from one state to another, or you can use loops and callbacks to create interactive animations. So it basically sets a baseline to create animation tools, in-browser animation tools. So for example, imagine and imagine a tool in your browser where you are controlling the position of an element throughout its timeline, and you are creating custom easing curves. So you can create and any sort of animation you want. So right now, the we don't have enough APIs to do that much in browsers, so I'm working on it. Yeah, it's it's a very exciting space and I've started exploring.
[00:19:33] Michael Jackson: Yeah, definitely. I I think it sounds like what you're building, it's it sounds like you could, if you wanted to, go back and build uh the kind of higher level abstraction uh based on what you're building, right? You say it's it's made for building animation sort of uh frameworks, essentially, almost like an an engine that you could build any kind of abstraction that you wanted to on top.
[00:19:57] Nitin Tulswani: Exactly. But uh I also live in constant fear because someone might use this and blame me for creating this mess.
[00:20:07] Michael Jackson: Oh, I can sympathize wholeheartedly with this concern. That happens to me all the time. I'm like, I hope I hope everybody's apps are okay, uh because if they're not, uh I'm gonna be sleeping for the next for the next 8 hours. So uh hoping everything nothing breaks while I'm asleep tonight. Well, cool. So so you know React Perf DevTools, uh you're doing a lot of work in animation. Any idea when when this new work that you've been uh that you that you've been talking about, any idea when when you think you'll have something to show or something to release, or or or is it- are are you working on React Spring specifically? I haven't actually looked uh looked into that, or were you just inspired by that?
[00:20:51] Nitin Tulswani: Not Spring specifically. I'm exploring every model, uh animation model, Spring model, and timing model. So I'm trying to combine 3 of them to see what I come up with.
[00:21:02] Michael Jackson: Well, best of luck in that. Uh it sounds very exciting.
[00:21:06] Nitin Tulswani: I hope so. It works.
[00:21:07] Michael Jackson: So something else that I thought was very interesting when I first saw it. And it actually kind of- you kind of inspired me. And I'll tell you why in a little bit. But you have another another project that you work on called Terminal in React, which is basically a component that renders a terminal. So just drop a a terminal component on the page and there you go. I think the first time I actually saw this component. Wasn't it on um wasn't it on Hacker News?
[00:21:41] Nitin Tulswani: Yeah, it was on Hacker News, yes.
[00:21:43] Michael Jackson: Yeah, I think I saw it there and somebody was like, oh my gosh, there's a whole like React component where you can basically just type in terminal commands. And and I was like, wow, this guy gets it because that's totally awesome, right? Like you you've got a whole terminal, all the behavior, all the everything is encapsulated in a React component. How cool is that?
[00:22:04] Nitin Tulswani: Yeah, so react-terminal in React, I actually started working on when I learned uh much more about React after my sophomore year. Um, I had to learn a lot more in React ecosystem, for example, state management and using like Redux, Sagas for data fetching and managing data. So I wanted to work on a project, so I'll be able to learn like everything from state management to data fetching. And I think this was uh right idea to work on a terminal. So inside a terminal, you can you can imagine a lot of states, for example, uh different commands, description, shortcuts, and setting customizing your own terminal animations. So it was a very cool and nice project.
[00:22:48] Michael Jackson: Did you take any time when you were uh experimenting with terminal in React to poke around the source of Hyper, which is from Zeit? That's another uh terminal, except theirs is like been out for a little bit longer and it's production ready and everything. And they, I know that that whole project is built in React. That actually might be uh kind of an interesting one for you to poke around.
[00:23:11] Nitin Tulswani: Actually, there's a mis- often there's a mis- confusion in the community. Uh this people start started comparing this project to uh the Hyper by Xiting. But I'll tell you that uh this project is very different And when compared to Hyper, uh actually it's a dummy component. It's not actually a terminal. It's, uh yeah, it's a dummy. So you can like use this and paste it in your website, or you can create an interactive portfolio using this terminal. So for you, imagine like a recruiter visiting your website and he just need to type commands. For example, website, so it will pop up your website. He types GitHub, so it will pop your GitHub. So it's actually a sort of show for showcasing users. And the HyperBazite is actually a, yeah, means a terminal, actual terminal.
[00:24:01] Michael Jackson: So, so Hyper is an actual terminal emulator. This thing uh looks like a terminal, but it's not like an, it's not a full-blown terminal emulator. One of the things that you did with this that I thought was interesting is you had like, I mean, you had multi-line input in there, so you could like define your own functions right there in JavaScript. Um, which, which I actually, I was just looking for that the other day, right? Because I was, I was in my terminal and I had to do some scripting and I had to use Bash. And I was like, what the heck am I doing Bash for? Like, like, why am I writing in Bash? Like, I, I, everything else I'm writing in JavaScript. And then like I need to get something done on my computer and I have to write Bash, right? I mean, I guess I could write a Node script, but what I was looking for was like a JavaScript shell. You know what I'm talking about? Yeah. Like a yeah, a shell, a shell where I could just write more, more something that feels a lot more like the Node prompt. Um, but that actually, you know, has like some niceties for like you know, interacting with the file system and and and defining variables and doing math and doing, you know, defining a function if I wanted to, you know what I'm saying? Like I I and I looked I looked around and a few people have kind of like played around with the same idea. Um, I think I found something called like JShell or something. I forget what it was called. But anyway, it was it kind of blew my mind that I was like, here we are in 2018, and if you want to do some kind of scripting on the command line, you're gonna use, you know, Bash or, or, or Z, Z shell or something like that. You really inspired me when I, when I saw your thing, I was like, oh, this could be really cool. Like if this was like an actual like terminal emulator that, you know, understood real JavaScript, that could be really, really neat.
[00:25:59] Nitin Tulswani: Yeah. That was one of the main objectives. Yeah. So also you can create your own plugins. So for example, you can create your own file system plugin. There's actually one created by Jonathan. And yeah, there are different kinds of plugins. For example, React Node Eval plugin. So you can, yeah, for example, what you were saying, you can directly evaluate JS code inside this terminal. Or you can use uh a VI plugin. So you can directly pop up the VI editor inside the browser.
[00:26:28] Michael Jackson: That one's crazy. Because I'm a I'm a Vim user and I look at that one and I'm like, whoa. Really? You can run VI in this thing? That's pretty awesome. So awesome. Nice work. Um, there's there's one more project that I thought was uh that I thought was super interesting and that uh that you mentioned before uh before we got started, actually, which is— I want to say it clearly so that people don't confuse it with Redux. It is this is not Redux. This is a project called Redocx. Which is a library that lets you create uh Word documents with React. This actually feels like something that's less of like uh just kind of an experiment and more of like, oh yeah, you know, like I could actually use this in my business if I wanted to, you know, create some real uh you know documents and I wanted to have a nice declarative model uh for creating these documents. It was this— uh tell me tell me a little bit of the backstory on this project.
[00:27:28] Nitin Tulswani: Yeah, sure. So um React team published an experimental package called React Reconciler so that community can start exploring host targets other than DOM. So I then started using it and experimented a little little bit with it. There weren't so many projects at that time that were using React Reconciler, so it was little difficult for me to structure the component API and render the components to the host target I need. But luckily, I found this project called React PDF. So with React PDF, you can render React components to PDF. So uh I had this thing in my mind that if you can render React components to PDF, then we can also render to a DOCX file. It makes sense because they share a similar interface and have a same surface of API like text nodes, styles, layouts, and graph and tables. So somehow the renderer worked at first and it was a shocking and proud moment for me because something very weird and clever that I've ever built. And uh the one of the use cases that uh it is built on is you can yeah use it to render the React components, Word documents on your server or your some- I don't know what you uh what you do with it, but yeah, you can actually use it to render React components to Word documents on fly, actually, with a very fast speed. So at that moment I realized that, yeah, I actually I start I shared the GitHub link on the Twitter and the response was overwhelming. I was actually worried about what community will feel about this project because it's actually weird. Like you are rendering the React components to DOM and then you suddenly decided to render it to Word documents. Why? Why would you do that?
[00:29:15] Michael Jackson: We talk about React as, you know, this abstraction that is decoupled from the rendering layer, right? So there's React and then there's ReactDOM and then there's React Native. And the React team also also maintains one called React Art. And I think it's it really helps us to see projects like React Docx and React PDF and because it it starts to It helps us to realize just how many different targets there are out there for this kind of technology. Um, you know, there was a React Canvas project that I thought was really, really interesting a couple years back. It's just interesting to see uh the kinds of experiments I think that people can sort of do for themselves and and the types of real things that they can build even um when you have the right abstraction, right? When you decouple the actual rendering of something from the way that you declare what should be rendered. So for example, I see that in react-docx you have a document uh component. You also have a text component. Um and so you can compose these things together and then out comes a Word document. And you can you can actually save it as a as a .docx file on the uh on the file system, which I assume you're probably just using uh you know the Node file system uh bindings for for writing out to the file system. But that's That's really uh awesome that you can that you know that that you actually went and found this abstraction and and and made a React renderer. I I would suggest that you probably know uh the React API a lot better uh you know than than a lot of the people who've worked on it. Probably you you probably even know the low-level React API better than me. Uh because uh I I've never actually built a a React renderer. I I've poked around that API. API quite a bit, but I've never actually gone in there and built one. What um what what was that? What how was that? What was that like? Was it did you find it was pretty well documented and and and maybe you you know you found a good example with React PDF, I'd assume, so you could kind of follow what they were doing?
[00:31:23] Nitin Tulswani: Yeah, initially uh it was difficult to grasp the package because it was like, this is a package, you can use it on your own. And uh there was a warning, I don't remember remember the actual warning, but uh I introduced some bugs in my renderer and then I was able to catch up with what it's actually trying to do, like how it is able to reconcile, apply the mutations. And when it clicked me how it works, then I decided to write a tutorial about it, like making custom React renderer. And then I shared everything from A to Z on how it works internally and how you can structure your own component API and how you can update and schedule or batch your own updates and use setState. Or in fact, you can also extend your ReactDOM renderer. So for example, you already use ReactDOM to render the React components, so uh on your end, React components are browser, but with React reconciler, I think you can create your own custom renderer and then bridge the your custom renderer with ReactDOM, and then you can extend the capabilities of DOM renderer. I'm actually working on an article which will help the community. Uh, I've just finished the draft version of it, and I will publish it soon on Twitter.
[00:32:45] Michael Jackson: That's awesome. So so you're you're essentially taking everything that you've learned, and you're publishing tutorials for other people who want to do sim similar stuff.
[00:32:54] Nitin Tulswani: Yeah, yeah, exactly.
[00:32:55] Michael Jackson: We have covered quite a bit of ground here. Is there— um, I always ask my guests before we before we wrap up the show, Is there anything that, uh, you know, is there any way that people can, uh, you know, find you and support the, the work that you're doing if they're interested? Or where would you, where would you send them? Like, you're, you'll see you are, uh, Nitin42 on GitHub. That's N-I-T-I-N-42 on GitHub, uh, which is where you publish all, all of your stuff. You are also N. Tulswani on Twitter. So that's how they can follow the work that you're doing. Um anywhere else that we can that we can find you or support the work that you're doing?
[00:33:38] Nitin Tulswani: Um no, I only use these two platforms, GitHub and Twitter. I post my work on- I upload my work on GitHub and share it on Twitter. So I don't have a Patreon account yet. I haven't actually given a thought to it, but I hope so. Yeah, there's one thing that I'd like to share with community. Last month I actually started receiving a bunch of emails like telling me, why do you make so so many weird projects, I haven't actually found any use case. I'd like to share one thing, which is having a software mindset can prevent you from making good stuff. So I think if you start caring more about the compiler optimization and highly optimized code, then I think you are suppressing the details and you are not making something good with it, good with the with the technology. So having a software mindset can prevent you from making good stuff. So. I would like to share with this community. So don't listen to those people. I was actually depressed. I received so many emails, weird emails, like, why are you creating Redux? I I won't use your project and this and this. And why are you not maintaining React Aya? So-
[00:34:47] Michael Jackson: I'm I'm so sorry to hear that, but I'm I'm uh I actually think that your approach to uh to the problem is right on, right? There's absolutely Nothing wrong with making software uh that you are, you know, you're that you're using to to experiment and to have some fun and to learn. And and the fact that you're taking the stuff that you're doing and contributing that back to the community, especially in, you know, these articles that you're writing and and the open source code that you're releasing, I think is tremendous. So uh I would encourage you to to keep that up. And uh and I would second what you say about like not uh you know not paying too much attention to people who are trying to get you to stop doing stuff like that. Um because it's it's you know it's you're sharing valuable stuff with the world. Um and and you know if it's not if it's not 100% ready for production, um you know you can always just throw a little a little sentence up at the top of your README that says, hey, just so you know, uh, I mean, you know, I'm not-
[00:35:58] Nitin Tulswani: Work in progress.
[00:35:58] Michael Jackson: Yeah, it's just a work in progress. I'm not even sure that there's something good here yet, you know. Um, I, I have actually a very good friend of mine, uh, uh, one of our past, uh, one of our recent guests, uh, James Long. He does that a lot on his reposts. In fact, he, he had one recently that he published and it was, it was absolutely hilarious. Like his uh his his his um his repo description, his README, because it was like, it was like, absolutely do not use this. If you use this, like, this is like, just don't use this because I'm not going to maintain it and it's going to change and yada, yada, yada. So, so don't use it. I mean, the the React team themselves, I think they, they recently uh had a, they released something called a— uh-
[00:36:44] Nitin Tulswani: Simple cache provider. Yes.
[00:36:47] Michael Jackson: The simple cache provider. They said something similar about that, right? They're like, this API will change. Okay, let's- there is no mistake about it. This thing is going to change. So please don't use it and then get all angry when it does, because we're experimenting and we're learning here, right? So maybe it's good to just kind of put a little something like that on there. But as long as you're doing that, I'd say it's totally good. More more power to you. Keep on keep on doing what you're doing.
[00:37:14] Nitin Tulswani: Yeah, exactly. If you are doing something fun, then have fun making it.
[00:37:18] Michael Jackson: Absolutely. Absolutely. I totally agree. All right. Nitin, hey, thank you so much for coming onto the React Podcast. Uh, before we go, is there any- is there anybody else that you wanna see on the show?
[00:37:30] Nitin Tulswani: Um, on the show, yeah, Siddharth, I guess. Siddharth Kestripal.
[00:37:35] Michael Jackson: Okay, yeah, no, I haven't- I haven't, uh, I haven't heard of him before. Is he- is he, uh, is he a colleague of yours or what has he done?
[00:37:42] Nitin Tulswani: Yeah, he- he actually works for Auth0 and he also has a bunch of interesting projects. For example, Cost of Modules. Which webpack uses for its webpack CLI. And uh he also, yeah, he has a bunch of different projects on his GitHub. Uh mind if I share his GitHub uh Twitter link with you?
[00:38:02] Michael Jackson: Yeah, no, not at all. We let's, how about let's look at it in the, uh we'll include it in the show notes. And thank you so much for taking the time to be with us today. Everybody, uh Nitin Tulswani, and we will see you We'll see you next week here on the React Podcast.
chantastic.fm