Answer the question
In order to leave comments, you need to log in
React project structure?
Let 's say this project:
https://github.com/Rhymond/product-compare-react/t...
Imagine that you need to create a header in the project, and in the header we will have a phone, various widgets for calls and a trash button., i.e. a bunch of vsgeo
Where would you insert the header component and everything you need for it?
my version:
In Components we create a folder Header
Inside the folder Header we create folders:
1) Phone
2) Cart
3) Logo
Or is it better not to make Phone Cart Logo so deep, but put it in Components? (it's really a cant, why put it in Components, if we use these components only in the header)
Answer the question
In order to leave comments, you need to log in
In components/header + nesting, everything is as you described in the question.
There are different approaches to organizing the structure, I like the approach by features (more difficult) or the stupid division into containers / components and that's it (easier, but a dump, suitable for starting to study). people who completed the second test task (video and text)
also had different approaches to organization . There are repositories in the comments of the video, you can check it out.
Inside the Header folder we create folders:
1) Phone
2) Cart
3) Logo
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question