-
Notifications
You must be signed in to change notification settings - Fork 893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Live reloading LiveViews without a hard refresh #2323
Conversation
mix.exs
Outdated
@@ -46,7 +46,8 @@ defmodule Phoenix.LiveView.MixProject do | |||
{:floki, "~> 0.30.0", only: :test}, | |||
{:ex_doc, "~> 0.28", only: :docs}, | |||
{:makeup_eex, ">= 0.1.1", only: :docs}, | |||
{:html_entities, ">= 0.0.0", only: :test} | |||
{:html_entities, ">= 0.0.0", only: :test}, | |||
{:phoenix_live_reload, path: "../phoenix_live_reload", only: :test, override: true} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to point to hex once we release live reload
Utils.force_assign(socket, key, val) | ||
end) | ||
|
||
handle_changed(state, new_socket, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is tricky because if the user changed mount
or handle_params
, those wouldn't be picked up. I partially feel the best way to go around this is to send a client a refresh and the client performs a full remount. Probably doing the changes in #2326.
❤️❤️❤️🐥🔥 |
Here are the complementary changes in the phoenix_live_reload Repo.