Answer the question
In order to leave comments, you need to log in
Is it okay to have a lot of React components in a small project?
Hello. I'm currently learning React. Friends suggested the "React + Redux - Professional Development" course on udemy. But already on the second project, I noticed that there are more and more components ( github ). But the project itself is not big. Is it normal that there are so many components on such a small project and you need to make a separate directory and file for each? And, if it's not difficult, drop the snare on some good (in terms of writing code) React projects to know how a real project should look like
Answer the question
In order to leave comments, you need to log in
There is no right answer, just like the question is extremely relative. Everyone has a different understanding of a "small" project. Also, do not forget that React is a library with a component approach. Let's take the Google home page for example. There could be such "large" components as "header" and "main" which in turn consist of many other components, such as: button / field / form / link and all this can be broken into smaller components as much as you like, until reach component level == tag(html).
In this case, the question is already how appropriate it is within the framework of a particular project. How small they should be depends on how reusable they should be.
Zs . I apologize if water/tautology
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question