Natter, I actually have a question for you. Uh, how do you kind of decide whether or not you're like with a compound kind of component? Um, how do you decide if you're going to be baking in other components or if you're just kind of leaving a space for children components to be, to be passed as, as, as a prop? Like what, what kind of a judgment call do you make there? Um, I mean, I guess kind of just always keeping the idea like extensibility and scalability. And if this, if there's any chance that they're going to use this by itself and make it to where that it's not going to be affected by having a parent. Um, I don't know, like, uh, everything that could be standalone should be enabled to be maybe standalone and that sort of thing. Um, I know that like at AWS, we were, um, building and supporting a UI library that kind of allowed people to just spin up like authentication flows and image pickers and stuff using, um, using React components and just like maybe one line of code and, um, some of those things were, um, kind of like relating to that. So for instance, for authentication flows, you could like spin up, you know, the entire flow with, with a single component, or you could kind of like nest within those components, um, individual components to kind of like configure things the way that you wanted, but we made it work either way. So you could use these components standalone, you can nest them together. And, um, and yeah, it seemed to work out pretty well, pretty well that way. I guess. Awesome.
Um, cool. I, uh, I know we are, we are running a little short on time, so I want to make sure we kind of hit all our main things, so I kind of want to move on to dynamic content and logic, just as kind of a broad topic, but, excuse me. Do you have any like best practices, uh, for bringing data into your components? And Sadek, I know that you, uh, you, you think about this a lot in, in terms of. Um, yeah, just in, in terms of how to get data into, into those components, ways to make that still re reusable, um, and dynamic if, if, if needed. I mean, yeah, it's, uh, it's a, it's a big challenge and your components could mean a lot of things. And often what we deal with, as I told several times already, we, we, we deal with websites, right? And a component could be part of any page basically. So, um, as I said, like the, maybe the most important thing is like to, uh, have a way to componentize the, the, the, the, the query, right. But you don't want to do like 10 queries or 20, 20 queries if you have 20, uh, components, so you need to kind of get one, one shot, all the content and then break it into different things. So we have, we have a concept for that, but you know, you can do it also with the graph QL, it's a, it's a very good way also to, to break the query into smaller parts, but then you can, you know, uh, form a bigger query. But the important thing is like, uh, it's important to think in components, even when you're talking about data, okay? Like, uh, and then, you know, there are different kinds of components, like you can have a page itself could be a component, right? The whole page is a component is a company as a page component. But then each section of it is a component. And then the, the small buttons and, and, and things that you show inside that kind of micro or section, uh, component or section are as well. So you need, so it's, uh, it's often is, um, so we, we try to make like, okay, best practices we, we see what, what matters, like it's a matter of at which stop, we should stop breaking things into smaller parts, right? So I think that it's, for us, at least for our experience, there has been the section level is, is the, is the middle ground. Okay. So let's break the data into the smaller sections and then, and then that's it. You know, each, each section will manage its own, its own, uh, data and its own, uh, uh, components because it, it seems to be in websites. This is how it goes. So it depends on the logic, on the app or what you're doing. Right. But it seems like sections are more or less independent and you can take that kind of make that kind of assumption and say like, okay, we break them into these kinds of macro things and then everything else will, will get from these data.
Comments