Skip to content

Define The Structure Of Folders And Files #3

@samuel-vergara-leon

Description

@samuel-vergara-leon

There is a lot of ways to structure folders.
Some common folders and files that we can expect are:

  • components: shared atomic components

    • index.js
    • ComponentName.jsx
    • ComponentName.style.jsx
    • ComponentName.docs.mdx
    • ComponentName.
      • ChildComponent.jsx
  • Styles: shared and global styles, including themes:

    • index.js
    • themes.js
    • global.css
    • variables.css
    • other.css
  • services: external API services code

    • index.js
    • Service
      • index.js
      • file.js
  • Utils: reusable js functions

    • Index.js
    • File.js
  • Pages: pages for each route, and the router

    • Router.js
    • AuthRedirect.jsx
    • Home.jsx
    • Page.jsx
  • Layouts: reusable layouts for mobile and desktop.

    • Index.js
    • SinglePane.js
    • SideBar.js
  • Templates: shared groups of components that works together:

    • index.js
    • Form.js
    • Table.js

What about this project? Any idea how to structure folders and files?

Metadata

Metadata

Assignees

No one assigned

    Labels

    DiscussionThis is a discussion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions