5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Create React AppでTypeScriptとScssを使う

Last updated at Posted at 2020-04-01

Create React App は React を学習するのに快適な環境であり、React で新しいシングルページアプリケーションを作成するのに最も良い方法です。(-- 新しい React アプリを作る)

Create React App を用いて ReactSPA ( single-page application ) を作成する際に、TypeScriptScss を導入するためのメモです。

Create React App のプロジェクトをインストール

npx create-react-app my-app --template typescript
# or
yarn create react-app my-app --template typescript

--template typescriptをつけるだけ

node-sassをインストール

npm install node-sass --save
# or
yarn add node-sass

あとはsrc/App.csssrc/App.scssに書き換えて、src/App.jssrc/App.scssを読み込むように書き換えるだけ

以上でCreate React AppでTypeScriptとScssを書ける。

参考

5
3
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
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?