1
1

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】学んだこと①

Last updated at Posted at 2025-12-27

やりたいこと

  • こちらで学んだ知識の整理(実装方法は省略)

  • 環境構築はこちらを参照

環境

ubuntu-24.04
node.js:   "v24.12.0"   # $ node -v
react:     "18.3.1"     # $ npm list react react-dom
react-dom: "18.3.1"
next:      "12.3.7"     # package.jsonを参照

フォルダの構成図

$ npx create-next-app blog   # 新規プロジェクト(blog)の作成

👇これは,👆のコマンドで入るもの以外も含む(実装に応じて適宜追加)

blog/
├─ .next/
├─ components/           # 各機能(コンポーネント)を実装, 定義とインポート時は"大文字"で始める!
  ├─ header.js          # Logo, Navをインポート
  ├─ hero.js
  ├─ footer.js          # Logoをインポート
  ├─ layout.js
  ├─ logo.js
  └─ nav.js             # 各ページへのリンクを作成
├─ node_modules/
├─ pages/                 
  ├─ blog/               
    └─ index.js         # Blogページ
  ├─ _app.js
  ├─ index.js            # Topページ
  └─ about.js            # Aboutページ
├─ public/
├─ style/                 # 各コンポーネントに適応させるCSSを格納
  ├─ globals.css         # CSSの初期化, ベースの仕様
  ├─ header.module.css   # headerコンポーネント用のCSS
  ├─ hero.module.css
  └─ footer.module.css
├─ jsconfig.json          # 絶対パスを使用可能にする記述
├─ next.config.js
├─ package-lock.json      # Reactなどのバージョンを記述
└─ package.json           # 実行時に必要な処理を記述

実行

$ cd blog
$ npm run dev  # 実行

結果

スクリーンショット 2025-12-28 041159.png

感想

  • Chapter1~3の内容を学んだ.
  • 6時間で100ページ進んだ.
1
1
1

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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?