Force assign ID on LiveComponents to re-render during :phoenix_live_reload
Live reloading does not currently work with live_components, as described in https://github.com/phoenixframework/phoenix_live_reload/issues/162.
This PR adds support for live reloading of live_components by force re-assigning the live component’s ID field when processing the :phoenix_live_reload message.
I’m not familiar enough with the LiveView internals to know if this is the correct approach, but it’s working well for me in testing - please let me know if there’s a better way to accomplish this.
FWIW, I have been talking to @chrismccord about supporting a new strategy which is basically rebuilding the page but without doing a full navigation. Regarding the patch above, I think it will call the update callback, which we probably don't want to? We probably need to change the Diff module and simply ask them to be re-rendered again?