-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Organize components into folders & export components in index.js
file
#413
Comments
@calisio What do you think about a folder structure like this? Maybe it gets the conversation started. Most of the application is grouped by features. We could define Pages and Components for each feature group.
|
@jtucholski Initially I really liked the idea of this. After thinking about it more, I had a few hesitations. One hesitation is that a lot of our components will be moving around from page to page as we evaluate what we need/don't need, so putting them in folders that separate them by page seems inefficient. Because React really prioritizes creating components that are reusable across pages, I think we should keep a similar structure as to what we have now but with a bit more refinement within the existing folders (while also adding a few more folders). I did some research on common folder structures for larger scaled projects, and I liked this one . With the update to the routes that has partially already happened/will continue to develop, I liked the idea of a |
Files could be better organized in the frontend by the use of folders. We should research a best way to organize these as our codebase will only grow from here.
Moreover, to make importing components from the same folder simplified, we should include an
index.js
file, especially in the/Components
folder. This should export all components in that folder so they can then be imported in the same line wherever they are used.The text was updated successfully, but these errors were encountered: