You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-27Lines changed: 6 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,45 +31,24 @@ node setup.js
31
31
-[Type definitions for React & React Native](https://github.com/DefinitelyTyped/DefinitelyTyped)
32
32
-[TS Jest](https://github.com/kulshekhar/ts-jest)
33
33
34
-
This template always uses the latest versions of the dependencies at the time when the setup script (`node setup.js`) is being executed. This means you don't have to worry about old versions.
34
+
This template always uses the latest versions of the dependencies at the time when the `react-native init` command is being executed. This means you don't have to worry about old versions.
35
35
36
36
Lots of :heart: and credits to the owners and maintainers of those packages.
37
37
38
38
### Why the setup script?
39
39
40
-
The React Native CLI supports automatic installation of production dependencies only. Since TypeScript and the other dependencies are dev dependencies, the setup script is being used to install those. It also takes care of obsolete files like the `.flowconfig` and the `setup.js` itself after the setup.
40
+
It deletes obsolete files like the `.flowconfig` and the `setup.js` itself after the setup.
41
41
42
-
### How will this template affect the React Native CLI workflow?
42
+
### Does debugging work?
43
43
44
-
The React Native CLI will do everything just as without a template and afterwards overwrite the files with the ones from this template. This means you don't have to worry about incompatibility issues with later React Native upgrades.
44
+
Yes it does.
45
45
46
-
### Does debugging work too?
47
-
48
-
Yes it does, but you need to enable the `sourceMap` option in the `tsconfig.json`.
49
-
50
-
Make sure it looks something like this:
51
-
```json
52
-
{
53
-
"compilerOptions": {
54
-
"allowSyntheticDefaultImports": true,
55
-
"esModuleInterop": true,
56
-
"jsx": "react",
57
-
"module": "es6",
58
-
"moduleResolution": "node",
59
-
"noEmit": true,
60
-
"noImplicitAny": true,
61
-
"target": "es6",
62
-
"sourceMap": true
63
-
},
64
-
"exclude": ["node_modules"]
65
-
}
66
-
```
67
-
68
-
This is not enabled by default as it is unknown if it has any negative effects on the transpilation time. For more information make sure to check out the [post by Nicolas Hémonic](https://medium.com/@NicolasHemonic/hi-mo-mac-d18286202602).
46
+
[](https://medium.com/@emin93/react-native-typescript-b965059109d3)
69
47
70
48
## :globe_with_meridians: Links
71
49
72
50
-["Using React Native with TypeScript just became simple" on Medium](https://medium.com/@emin93/react-native-typescript-b965059109d3)
51
+
-["24 tips for React Native you probably want to know" on Albert Gao's blog](http://albertgao.xyz/2018/05/30/24-tips-for-react-native-you-probably-want-to-know/#9-For-Typescript)
0 commit comments