Kency Dodds, Levin, Hugh discussed on The 6 Figure Developer Podcast

Automatic TRANSCRIPT

Like the biggest api you could have ever imagined There was an option for everything. And if you wanted to override something you had to use a prop and it was overrides galore because react table was controlling the markup and the css and like the styles for everything. It was rendering. Somebody's like actually. I don't wanna the pagination on the bottom of the table. I wanted at the top. And i'm like upgrade. Well you're gonna have to override have to add more props right. Here's some more so Early on react table and it was still popular. Got really popular even even doing that. This jet passover my house here really quick levin air base so it's perfect for streaming recording So adding props for everything. It was ridiculous so early on. I learned this lesson even after it was becoming popular that i needed something more sustainable and i was using a library. Fra built by kency dodds. He actually just lives like an hour. South of me We have lunch occasionally. He's a great guy. He built downshift which is a library for building. Select auto complete experiences multi. Select stuff and It was headless. I really liked this approach. It's a utility right. And he showed me kennedy render props approach where essentially you are doing everything that you would normally do in a in a ui library except rendering hugh i. It was like a light bulb. Went off right. And so after i discovered that is like react table needs to be this way so i ripped out all of the markup and all the styles and i turned react table into a headless. Ui utility. what this means is that it's handling literally everything for you. All the state management that callback events Everything for you. The only thing that it does not do is attach the props to your mark and by not doing this. It just one. It got rid of a million issues and get hub from people asking for props for options for things right but on it also allowed basically anybody to do anything. They wanted with the table The table then didn't really have to be a table. It's just really just data management that is catered towards tables So now you can. Do you have your filtering in your sorting. And you're grouping and aggregation and all this stuff and at the end of the day you just kind of build your table however you want you want to use material. ui us bootstrap you want to build your own. You could hook it up to a chart seriously. You can hook it up to a chart for all i care. You just have to attach props in certain places and loop over some of the data model that react tables producing in house arrest for you and it doesn't in a very.

Coming up next