N
N
Nikolai Antonov2016-12-11 00:44:44
React
Nikolai Antonov, 2016-12-11 00:44:44

How do you structure components in react applications?

It is customary to divide components into smart (control other components) and stupid (only render data). But when the project is too big, you still have to somehow group smart and stupid components separately. At first, the idea comes to mind to group according to which sections of the site components are used, but then you have to reuse them in other sections.
What is the best way and on what grounds can the components be separated?
What is your project structure?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2016-12-11
@maxfarseer

There is a components directory, there are containers. There is an almost flat list inside, when some explicit group appears, for example, 5 filter components, I create a separate subdirectory.
I suggest you don't worry too much about it.)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question