Closed nojaf closed 5 years ago
yup, this works as intended since it's the least amount of work without messing with angular internals like wrapping providers etc. also see "Hot Reloading in React or, an Ode to Accidental Complexity" https://medium.com/@dan_abramov/hot-reloading-in-react-1140438583bf
if you want to persist state you can use the store object on destroy
Thanks for the explanation. I already persisted my state in sessionStorage.
Hi, I'm coming from a react background and used hmr in things like create-react-app.
I've currently have hmr configured in my angular app, but it works a bit different than I expected.
So I make a change inside a file, HMR kicks in but it reloads my entire angular app. My main module gets reloaded and events like route changed get replayed as well. The behavior is very much similar to when you refresh the entire page. Except with HMR the html and other stuff is still loaded.
Is this the way it is supposed to work? Or should I create angular modules and will only those be reloaded when files changes?