I have created a new project of React Native with a typescript template using the official command react-native init MyApp --template typescript (a couple of times) and I can't see the changes I apply when I run the app.
Looks like the hot reload its working on terms of refresh the screen but doesn't apply the changes. In the case I create the app without typescript all its working properly.
I don't get any error so I have no idea what I can do. Below its the package.json in case this help but its basically the autogenerated file from typescript template
{
"name": "MyApp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.3",
"react-native": "0.58.4"
},
"devDependencies": {
"@types/jest": "^24.0.0",
"@types/react": "^16.8.2",
"@types/react-native": "^0.57.34",
"@types/react-test-renderer": "^16.8.0",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "24.1.0",
"jest": "24.1.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3",
"ts-jest": "^23.10.5",
"typescript": "^3.3.3"
},
"jest": {
"preset": "react-native"
}
}
tsconfig.json
{
"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"]
}
Any idea how I can get react-native working with typescript. Thanks!