3 ms·
No, and while there is a capability to hot reload releases (so that you could preserve state while deploying an update, for example), in practice almost no uses
by jeremyjh 3y ago
No, and while there is a capability to hot reload releases (so that you could preserve state while deploying an update, for example), in practice almost no uses it because it is complicated.
In practice, if you care about this aspect of user experience you may have to take some reasonably small steps to preserve state information in the client. Form state gets preserved automatically for most purposes, though there may be some forms that need to implement a call-back to preserve state, as explained in the docs: https://hexdocs.pm/phoenix_live_view/form-bindings.html#recovery-following-crashes-or-disconnects https://hexdocs.pm/phoenix_live_view/form-bindings.html#reco...
- throwawaymaths 3y agoI think liveview live reload uses hot reloading, so that's definitely a very nice ergonomic improvement that basically everyone uses all the time
- jeremyjh 3y agoNo, the dev tool works differently, it does not use the OTP release feature I’m talking about. If you hot upgrade stateful modules you have to supply migration functions when the structure changes. https://www.erlang.org/doc/design_principles/release_handling.html https://www.erlang.org/doc/design_principles/release_handlin...