5

I have used the CRA or (create-react-app) a lot while starting react. The hot reloading of CSS changes work and are awesome. Whereas hot-reloading of JSX and class functions don't work - if I change JSX or some event handler - the page reloads.

Some threads pointed out that if I uncomment this line

//require.resolve('webpack/hot/dev-server'),

in webpack.config.dev.js then it will work - but it still doesn't work

Neither does this webpack flag work in package.json npm start script:

"start": "webpack-dev-server --progress --colors --hot --config webpack.config.js"

--hot doesnt work.

Now I'm learning Redux - and one of it's features is hot reloading - so if I just learn Redux - will I be able to do it - or this is some config change or will I have to install some extra NPM package? Please guide.

user7637745
  • 965
  • 2
  • 14
  • 27
Probosckie
  • 1,585
  • 4
  • 25
  • 40

0 Answers0