Wondering if this is the expected behaviour? I was expecting the live reload to compile without changing the current assigns; without calling ‘mount’ …
I’ve just tried this after creating a new LiveView project with ‘mix new project_name --live --no-ecto’.
Any ideas very would be much appreciated! I’m using Elixir 1.11.4, Phoenix 1.5.8, LiveView 0.15.1
Live reload doesn’t mean that you’ll get everything through socket. It means that page will reload(new get request) automatically if its css/html/js was modified, and that is exactly what happened. Doesn’t matter if it’s liveview page, or regular.
“live reload” name was picked before “liveview” and they are not directly connected
Yeah, it’s like an automated refresh. Why do you need a socket persistence? Live reload is only for development purposes, so, just have lost the state and forget.
In ClojureScript, Figwheel does this and it’s amazing. Is there anything technical stopping us from building something like a stateful live refresh in Phoenix, or is it just that nobody’s done it yet? If there aren’t technical barriers, does anyone have thoughts on how to go about beginning something like Figwheel for Phoenix and if it would be a good idea?
So I ran across an Oct 2021 blog post with an answer to this by a new mapping company that uses Elixir and Phoenix 1.6 in their core product. They’re using React, and adding the ReactRefreshPlugin to Webpack. So, nice, but not yet quite what @BartOtten was hoping for. Btw I’m really loving LiveView with Phoenix 1.6.