A
A
asqwerty2021-12-24 14:00:23
React
asqwerty, 2021-12-24 14:00:23

Component question?

Hello. As a practice, I decided to make a test task from Aviasales found on the Internet. I immediately realized that each flight is a separate component. But here's how to understand whether I need to put the top panel with the sorting of flights into separate components or put the panel with the number of transfers into a separate component. This is in fact stupid (after all, we use it only 1 time), but it seems like it’s just a separate socket. And it's kind of going to be very hard to associate with an array of flights.
Here is the layout if anything, but I don't know if others will open it: https://www.figma.com/file/9Kg5mjwM53YnxOXRGchSAQ/...
61c5a8385f7e4676403950.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2021-12-25
@asqwerty

The question is not how many times it is used. Yes, sorting and transplanting are separate components, and the items within them are also separate components.
In order to bind data, read about the API context.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question