create-react-native-app-typescript icon indicating copy to clipboard operation
create-react-native-app-typescript copied to clipboard

HMR doesn't work

Open AleksandrChernyavenko opened this issue 7 years ago • 3 comments
trafficstars

create new empty project, enable hot reloading, change text in App.tsx -> nothing happens

Expected result: text on screen should change

  • create-react-native-app my-app --scripts-version=react-native-scripts-ts:
  • cd my-app:
  • npm start:
  • press I ( open IOS emulator )

AleksandrChernyavenko avatar May 08 '18 11:05 AleksandrChernyavenko

This fixed it for me:

tsconfig.json


 {
   "compilerOptions": {
-    "target": "es5",
+    "target": "es2015",
-    "jsx": "react-native",
+    "jsx": "react",
 ...

AleksandrChernyavenko avatar Jun 22 '18 14:06 AleksandrChernyavenko

I'm wondering what the jsx option really does 🤔

Anyhow, if it works for you, it should be harmless. Do you want to create a PR to fix it?

mathieudutour avatar Jul 03 '18 11:07 mathieudutour

It's just the Wireless, USB works without any problem.

theapache64 avatar Jul 03 '18 11:07 theapache64