1

I have integrated react.js with my laravel project . So I tried to change the file in /components/Example.js. But It is not showing the new change in the view page . When I run

npm run dev

Only after run this command, the new changed component is showing in view file.
Do I need to run npm run dev for everytime making changes in reactjs?

farooq
  • 1,603
  • 2
  • 17
  • 33
  • 4
    Use `npm run watch --watch-poll` command after starting your developing and NPM will listen and re-build all your JS components on the fly after any changes –  Oct 10 '19 at 08:39
  • Do I need to keep it running in my terminal ? @RobinSingh – farooq Oct 10 '19 at 08:41
  • 1
    Yes of course otherwise it terminate your process –  Oct 10 '19 at 08:43
  • @RobinSingh Any other alternative for this ? What if I make any changes in my server ? Do I need to run `npm watch` in my server too? – farooq Oct 10 '19 at 08:44
  • 1
    Please check [this](https://stackoverflow.com/questions/41866944/npm-run-watch-not-working-in-laravel-5-4) –  Oct 10 '19 at 08:45

0 Answers0