3

I have a React app that is deployed in amazon aws. Whenever i update the code, i need to force hard reload manually on the client side(on Chrome ctrl+f5). Is there a way to not have to do this manually in React?

I've noticed some posts about setting a query string param with a versioning system, and many solutions for angular CLI, but nothing on React.

Is there i flag i can pass in the build of the code?

Sulthan
  • 128,090
  • 22
  • 218
  • 270
franmcod
  • 457
  • 4
  • 13
  • This has nothing to do with react. All single-page JS frameworks are compiled into a single JS file, be in Angular, React or other. You just put a hash to the end of that file. The build system is similar for all JS frameworks. – Sulthan Apr 15 '19 at 20:22
  • @Sulthan so concat to the index.js file the version. index1.0.js ? so on – franmcod Apr 15 '19 at 20:24
  • It's easier to add a timestamp or a hash generated from content instead of keeping a version. – Sulthan Apr 15 '19 at 20:27

0 Answers0