Preserving Socket State with Phoenix LiveView Hot Reload

85
clicks
Preserving Socket State with Phoenix LiveView Hot Reload
Jakub Skałecki discovered and shared a useful feature for Phoenix LiveView developers: an option to preserve socket state during hot reloads in the development environment. This can be achieved by adjusting the `dev.exs` Endpoint configuration to include `live_reload: notify` and updating `live_reload: patterns` accordingly. Jakub highlights this feature as a game-changer, particularly for developing complex LiveViews with forms or ephemeral state, acknowledging it can save a lot of time typically lost in development without it. The post invites discussion around the documentation of this feature, questioning whether it might have been overlooked by others or inadequately highlighted in official resources.

© HashMerge 2024