So far, I kind of focused on primitives. Let's go to the far extreme of the complexity spectrum and look at React Table. One year ago, the author of React Table, gave a great talk on this very stage explaining why he went the headless route with React Table. One of the points he made, by the way, great talk, highly recommend checking it out, and one of the points he made is about simplicity of APIs.
So, React Table is a big piece of software. It does a lot. It's quite advanced. It can react to changes in the data, and a lot of functionality. A lot of functionality means a more involved API, right? We do more, we need more to describe it. So, let's see how the API looks like. I'm going to open this in VS Code again. So, we have something called a table. It has getters and setters, and it gives you a list that you map on to your view. And you might think, like, this is involved, right? This is a lot of mapping, this is a lot of stuff I need to know. But actually, all you need to do is use the hook to get the table. Everybody knows how to use getters and setters, everybody knows how to use a map, right? And everybody knows what this piece of code does. This is just an HTML snippet.
So, after an initial getting used to period, your skills can be transferred from whatever you're used to onto this project much more easily than a proprietary alternative, right? To think about how much you can customize in the view of such a complex table. If you had to parameterize everything, just a sheer number of properties you need to dock is going to completely outshine the interesting functionality parts. So, at this point, you might think, wait, so it's just more work? And I would say yes. I mean, if you're building a POC, yeah, it's going to be more work to write some HTML and for real project with a unique design, you will probably have to customize all of the defaults, right? You don't want your application to look like any other application that was developed using this components library. So you're going to have to rewrite it. You're going to use a proprietary way of describing the changes. It's not going to be less code, it's not going to be less work. And I keep banging on the proprietary side of things. But when you onboard new team members, it makes a big difference if they need to learn everything from scratch or they can transfer their skills. I would also argue that it is less work because it reduces the chances of a rewrite. If you hit the customizability wall later in the game, as you do, you are in the money time of the project, you're probably over the budget and you want to get it done. And whatever solution to this problem you come up with, it's going to be at the expense of your sleeping time. And as a person who values sleep, I find mitigating that risk very valuable.
Comments