- Note

typescriptでreact native

npx create-expo-app@latest などでやるとプレビュー版が入って困ったので半手動でやる方法

1.
https://download-directory.github.io/
https://github.com/expo/expo/tree/main/templates/expo-template-blank-typescript フォルダをダウンロード

2.
package.jsonを下記にする。

3.
変えたらCMDで

pnpm i expo
(pnpmで管理するため)

インストールされたら
npx expo install expo-status-bar react react-native

その後
npx expo start
typescript、reactの型をインストールするか聞かれるのでYとする

4.
よく使うライブラリを入れる
npx expo install @react-navigation/native @react-navigation/stack react-native-screens react-native-safe-area-context

5.
その後の更新などは
npx expo install –fix
npx expo install –check

コメントを残す