LoginSignup
0
0

More than 1 year has passed since last update.

React+TypeScriptアプリの作り方

Posted at

目的

React+TypeScriptのサンプルアプリを作って、そこでReact+TypeScriptアプリの書き方を練習したい。

環境情報

macOS Catalina 10.15.7

$ node -v
v16.3.0

$ npx create-react-app --version
4.0.3

node のバージョンは何にすればいい?

プロダクションアプリケーションでは、アクティブ LTS または メンテナンス LTS リリースのみを使用することがすすめられているけど、今は勉強に使うだけなので、最新版にする。(2021/6/19時点でv16.3.0)

インストール

$ npx create-react-app my-app --template typescript

Happy hacking! と表示されて完了。

実行する

Happy hacking! のメッセージの上にあった以下の手順で実行する。

$ cd my-app
$ npm start

ブラウザが開いてアプリが表示された。
表示されない時でも、実行ログに表示されているhttp://localhost:3000にアクセスすればOK。

感想

かんたん!

参考

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