Phoenix LiveView 1.1 released!
2025-08-31
Phoenix LiveView 1.1 introduces colocated hooks, allowing developers to write JavaScript hooks directly within HEEx component files using a <script :type={ Phoenix.LiveView.ColocatedHook }> tag, which the compiler automatically extracts at build time and registers via a generated manifest file. The feature also adds hook name prefixing with a leading dot (eg .Sortable) to prevent naming conflicts across the global hook namespace and enable safer library authoring. This enhancement addresses the previous friction of maintaining separate JavaScript files for small hooks that logically belong to specific components.
Was this useful?