react native create app typescript code example
Example 1: create react app typescript
npx create-react-app app-name --template typescript
# or using yarn
yarn create react-app app-name --template typescript
Example 2: react native typescript
npx react-native init MyApp --template react-native-template-typescript
Example 3: react native typescript
npx --ignore-existing react-native init MyApp --template react-native-template-typescript
Example 4: react-native use typescript
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"isolatedModules": true,
"jsx": "react",
"lib": ["es6"],
"moduleResolution": "node",
"noEmit": true,
"strict": true,
"target": "esnext"
},
"exclude": [
"node_modules",
"babel.config.js",
"metro.config.js",
"jest.config.js"
]
}