Project structure: a feature to handle Application boostrap & layout
mauro-ni opened this issue · comments
Hi,
what do you thing about handle Application Bootstrap and Layout as a feature?
When starting an application it is often necessary to extract data from the server and consequently show a loading page. Then when the client get the data the landing page (with its layout) is rendered to the user.
Any suggestion regarding the name of this feature?
This feature could also include things such error pages that you put in misc feature.
What do you think?
Many thanks in advance,
Mauro
handle Application Bootstrap and Layout
Im not sure what you mean by this, do you want to use these terms as feature names?
Perhaps you can consider the Layout, Error & Loading as common components and the features as something that puts them together? Consider the following structure:
src
/components
/Loading
/Error
/Layout
/features
/LandingPage
/SecondPage
/etc...
Personally I would stay away from using misc
as a feature, it can be ambiguous to other developers and could become a dumping ground for components and features when developers arent sure where it should go.
I hope that helped
-G
@CodeNameGrant when the application starts, I need to call the back end (graphql) and extract some date that will be available to the whole app.
At the moment Bootstrap related things are placed in the following locations:
- src/components/Layout (layout components)
- src/api (graphql queries)
- src/hooks (hooks)
I wonder if Bootstrap can be seen as a feature.
Thank you,
Mauro