S
S
smartbe2021-01-27 22:42:37
React
smartbe, 2021-01-27 22:42:37

Separation into components?

Good evening everyone!

I want to make a table with a library of components. The library has a table component. For example, this is the Table itself which combines Head, Body, Footer.

Head stores column names, filters, sorting.
The Body stores the element mapping. The Footer stores the Question
pagination .

What is the best way to separate components inside my application? For example, a table header is stored in a separate folder, mapping is stored in another folder, and pagination is stored in a third folder. I'm just asking why. All this needs to be covered with tests + in one case, use redux with connectors and dispatchers, in others, local state

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Makarov, 2021-01-28
@kirbi1996

Well, create a folder and a Table component in the components folder and there are three components in it. Then you can use them separately if that.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question