Article

AntDesignとReactをTypescriptでって素振りの前に詰まった

※ 商品リンクから購入されると少額の報酬が発生することがあります。

AntDesignをreactで使って、Typescriptで書くってドンピシャなんだけれども。

 $ yarn create react-app antd-demo-ts --scripts-version=react-scripts-ts

これがよくわからず。 なぜかこれで create-react-app がインストールされて、 antd-demo-ts が出来上がるし、 antd-demo-ts の中にそれっぽいファイル群もできる。ただし、 src/App.tsx はできずに、 src/App.js ができてしまう。

次のようにすると思った通りのもの、つまり src/App.tsx ができるんだけれども。

 $ yarn global add create-react-app
 $ rehash
 $ create-react-app antd-demo-ts --scripts-version=react-scripts-ts

これが正しいのかよくわからん情弱なので元ドキュメントへPRを作ったら良いのかどうかもわからん。

もう少し先に進めてみよう。

Prev Entry

Next Entry