alt icon indicating copy to clipboard operation
alt copied to clipboard

Hot reload?

Open LeoIannacone opened this issue 9 years ago • 3 comments

Hi, according with docs: http://alt.js.org/docs/hot-reload/

I should use this makeHot utils which actually does not exists.

I tried without nothing, but all the stores lose the their states. How can avoid this and be sure that the stores will maintain their states while react reloads?

LeoIannacone avatar Oct 22 '16 16:10 LeoIannacone

Actually it does exist, but it's available as a separate repo. See alt-utils.

I'm sending a PR in order to update this on docs. See #694.

diessica avatar Oct 22 '16 18:10 diessica

Looks like does not work as expected. I'm using now makeHot, but the stores got a reset on rebuilding.

Should I import them before the <AppContainer> wrap ?

LeoIannacone avatar Oct 23 '16 09:10 LeoIannacone

I'm actually works, but not when I call store.getState() in a render function (in that case the store state is empty)

LeoIannacone avatar Oct 24 '16 16:10 LeoIannacone