2

Every time i make changes to my code, i have to do a npm cache clean to reflect the changes i made. Is there any permanent solution for this?

I already tried the solutions given in React native run-android do not updating modified code , but still it is temporary.

I also have enabled hot reloading and live reloading as well. But even if i had not done it, it should update changes when reloaded manually.

My emulator is Nexus 5X, API version 28, memory 2048 MB.
react-native-cli version: 2.0.1
react-native version: 0.59.3.
I'm using ubuntu 18.04 and the RAM capacity is 8gb.

Muaz
  • 133
  • 2
  • 12

2 Answers2

2

In my case when I disable debugging then it updates. So this is my solution.

in Chrome dev tools > Network > Disable cache Hope that shell work for you

Shubham Sharma
  • 479
  • 4
  • 8
-2

'Cache-Control': 'no-cache'

put this line in headers part.