goatslacker / alt

Isomorphic flux implementation
http://alt.js.org/
3.45k stars 323 forks source link

Hot reload? #693

Open LeoIannacone opened 7 years ago

LeoIannacone commented 7 years ago

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?

diessica commented 7 years ago

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.

LeoIannacone commented 7 years ago

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 wrap ?

LeoIannacone commented 7 years ago

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