2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【React】Reactのディレクトリ構造

Posted at

Reactのディレクトリ構造

my-react-app/
├── public/
│   ├── index.html
│   └── favicon.ico
├── src/
│   ├── assets/
│   │   ├── images/
│   │   └── styles/
│   ├── components/
│   │   ├── Header.js
│   │   ├── Footer.js
│   │   └── Button.js
│   ├── pages/
│   │   ├── HomePage.js
│   │   └── AboutPage.js
│   ├── services/
│   │   ├── apiService.js
│   │   └── authService.js
│   ├── utils/
│   │   └── helper.js
│   ├── App.js
│   ├── index.js
│   └── App.css
├── .gitignore
├── package.json
├── README.md
└── yarn.lock or package-lock.json

public/

静的なファイル(HTML、アイコンなど)を格納します。

src/

ソースコードを格納します。ここには主にReactコンポーネント、スタイル、画像などが含まれます。

assets/

画像やスタイルシートなどの静的なアセットを保存します。

components/

再利用可能なReactコンポーネントを格納します。

pages/

ページコンポーネントを格納します。各ページのレイアウトやコンテンツがここに含まれます。

services/

APIリクエストや認証などのサービスロジックを管理します。

utils/

ヘルパー関数やユーティリティーを格納します。

App.js

アプリケーションのルートコンポーネントです。

index.js

アプリケーションのエントリーポイントで、ReactDOM.render() を使用して App コンポーネントを DOM にマウントします。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?