Skip to content
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

Project structure: a feature to handle Application boostrap & layout #89

Open
mauro-ni opened this issue Aug 29, 2022 · 2 comments
Open

Comments

@mauro-ni
Copy link

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

@CodeNameGrant
Copy link

@mauro-ni ,

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

@mauro-ni
Copy link
Author

mauro-ni commented Sep 2, 2022

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants