ponikar / react-native-reanimated-3-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 yarn start or npm run 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

About


Languages

Language:Java 35.9%Language:TypeScript 22.6%Language:C++ 15.1%Language:Objective-C++ 13.6%Language:Ruby 4.9%Language:Starlark 4.0%Language:JavaScript 1.4%Language:Shell 1.0%Language:Objective-C 0.8%Language:CMake 0.6%Language:Swift 0.2%