/xucre-wallet

Primary LanguageTypeScript

TypeScript Example

Supports Expo iOS Supports Expo Android Supports Expo Web

npx create-react-native-app -t with-typescript

TypeScript is a superset of JavaScript which gives you static types and powerful tooling in Visual Studio Code including autocompletion and useful inline warnings for type errors.

🚀 How to use

Creating a new project

  • Install the CLI: npm i -g expo-cli
  • Create a project: npx create-react-native-app -t with-typescript
  • cd into the project

Adding TypeScript to existing projects

  • Create a blank TypeScript config: touch tsconfig.json
  • Run expo start to automatically configure TypeScript
  • Rename files to TypeScript, .tsx for React components and .ts for plain typescript files

💡 You can disable the TypeScript setup in Expo CLI with the environment variable EXPO_NO_TYPESCRIPT_SETUP=1 expo start

📝 Notes

How to Build - Local

  • npx expo run:android

How to Build IOS - Deploy

  • npx eas build --profile production -p ios

How to Build APK - Deploy

  • npx eas build -p android --profile preview

How to Deploy - Prod - Android

  • npx eas submit -p android

How to Build APK - Local

  • eas build -p android --local --profile production

How to Build - Local - Production

  • npx expo run:android --variant release

How to Build - Prod

  • eas build -p android --profile production_deploy

How to Deploy - Prod - Android

  • npx eas submit -p android

How to run language translation validation

  • ts-node --esm ./scripts/compareLanguages.ts
  • change the comparison by updating params in console.log

Compile error checklist

  • Run npm i
  • Delete node_modules and run npm i
  • Delete android/app/build directory

How to update version

  • package.json version
  • app.json version
  • android/app/build.gradle version
  • android/app/build.gradle versionCode Versions should all be the same value. VersionCode should increment by 1

How to clear cache

  • npm i
  • npx expo start -c

1-7-2024 - Refire Deployment npm i && cd ios && pod install && cd ../ && npx expo start -c

ios prod npx expo run:ios --configuration Release