Skip to content

Instantly share code, notes, and snippets.

@ixtk
Last active May 18, 2025 10:52
Show Gist options
  • Save ixtk/2380da6c4e07e067557a85bf7ce31c74 to your computer and use it in GitHub Desktop.
Save ixtk/2380da6c4e07e067557a85bf7ce31c74 to your computer and use it in GitHub Desktop.

თითოეული გვერდისთვის შექმენით ცალკე ფოლდერი pages-ში. და თითოეულისთვის შექმენით ცალკე CSS & JSX ფაილები (არ დაწეროთ რომელიმე კონკრეტული გვერდის კოდი App.css-ში)

src/
├── mock-data/
│   ├── products.json
│   ├── users.json
├── shared/
│   ├── Header.jsx
│   ├── Footer.jsx
│   ├── Layout.jsx
│   ├── Main.css
│   └── ...
├── pages/
│   ├── home/
│   │   ├── Home.jsx
│   │   ├── Home.css
│   │   ├── Banner.jsx
│   │   └── ...
│   └── about/
│       ├── About.jsx
│       ├── About.css
│       └── ...
├── lib/
│   ├── axiosInstance.js
│   ├── AuthContext.jsx
│   └── utils/
│       ├── formatDate.js
│       └── ...
├── App.jsx
└── ...
  1. Every shared component or style (that will be used in multiple pages by the whole app) goes into the shared folder
  2. Everything (jsx + css) about a particular page goes into the pages/<page> folder (the page component file itself and any smaller sub-components it uses, like EditPage.jsx might use a sub-component EditForm.jsx)
  3. Just for the sake of consistency, always use named export/import (no export default).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment