Skip to content
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

Merged
merged 5 commits into from
Nov 29, 2022
Merged

Conversation

bemesa21
Copy link
Contributor

@bemesa21 bemesa21 commented Nov 11, 2022

Here are the complementary changes in the phoenix_live_reload Repo.

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}
Copy link
Member

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)
Copy link
Member

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.

mix.exs Outdated Show resolved Hide resolved
@chrismccord chrismccord merged commit de1a2cd into master Nov 29, 2022
@chrismccord
Copy link
Member

❤️❤️❤️🐥🔥

@chrismccord chrismccord deleted the bms_live_reload branch November 29, 2022 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants