I and my frontend engineer friends often talked that structuring a project is more difficult than actual coding.
If you’ve done a few projects with React in the past, You can use the existing structure or use the structure you feel comfortable with.
If you have not used React for a while, or if this is the first time doing React project, you may be at a loss on how to set up a folder structure.
While I was working as a frontend coach in a coding BootCamp,
I witnessed that alumnus also struggled to find the best way to put files in a project. And they asked me a question about this, so I’ll share the brief answer that I gave to them here as well.
1. You are not the only one who feels lost! Don’t worry about it. Managing a project structure is difficult for everyone.
2. Check out other projects’ codes on Youtube.
Search for React project tutorial videos on Youtube.
The tutorial videos often provide the GitHub link where you can see the project’s result code like the video below.
e.g.) https://www.youtube.com/watch?v=VsUzmlZfYNg&list=WL&index=3
3. Check the official document of the React team
https://reactjs.org/docs/faq-structure.html
React team suggested spending no more than 5 minutes to decide on the folder structure.
4. If you join your future team, you can simply follow their ready-made folder structure rule.
Hope this can help someone.
Happy hacking everyone! :P