LoginSignup
12
1

React開発環境の用意

Last updated at Posted at 2023-10-15

Node.js

推奨版バージョンのNode.js https://nodejs.org/ja をインストールする

React 公式サイト

スキャフォールディングにてReact PJを新規作成する

Create React App

Create React AppはReactが公式に推奨されている、最も使用されているスキャフォールディング

公式サイト https://create-react-app.dev/

プロジェクトを作成する

TypeScriptを使用する

### npx を使用する
npx create-react-app my-app --template typescript

### npm を使用する
npm init react-app my-app --template typescript

### yarn を使用する
yarn create react-app my-app --template typescript

プロジェクト構造

プロジェクトの入り口 src/App.tsx

プロジェクトを起動する

npm run start

vite

Vite は Vue の作者がリリースしたパッケージングツールで、起動速度も速く、近年で非常に人気です。

公式サイト https://vitejs.dev/guide/

プロジェクトを作成する

npm create vite@latest react-demo-vite --template react-ts

yarn create vite react-demo-vite --template react-ts

その他の作成方法は公式サイトをご参考ください。

プロジェクトの構造

プロジェクトの入り口 src/App.tsx

プロジェクトを起動する

npm run dev

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