Based on these articles, what would an ideal file structure look like for a React project, in your opinion?
A: Based on the articles, one thing is clear: there is no one way, or even right way to structure a project. However, there are some good ideas to follow. Personally I think working with base structure and modifying it based on the type of project and/or the size of the project is probably the best approach. Alexis Mangin probably has the best approach by using the same structure for each project. As I said before, I still think because of complexities, modularity and flexibility will probably play a part in modifying the structure that's chosen. Here is a link that takes another approach which I find intuitive. Again, based on the project, this might not be the best, but it's simple to understand.
A Better File Structure For React/Redux Applications
Below is something I would probably use as my base to start:
- /src
- /actions
- ButtonActions.js
- FormActions.js
- /components
- Header.js
- Sidebar.js
- NavBar.js
- Register.js
- User.js
- UserProfile.js
- UserAccount.js
- /containers
- App.js
- Command.js
- Index.js
- User.js
- /styles
- main.css
- header.css
- sidebar.css
- navbar.css
- form.css