Phoenix LiveView 1.1 released!

submited by
Style Pass
2025-07-31 22:00:13

LiveView reached the 1.0 milestone in December 2024. Since then, we’ve been hard at work building some long awaited features and improving the overall LiveView experience.

To update from LiveView 1.0 to 1.1, simply follow the CHANGELOG with the upgrade steps or alternatively run the Igniter upgrade task:

At ElixirConf EU 2023, Chris briefly mentioned colocated hooks to address the friction when you need to write a small JavaScript hook for your HEEx component, which would fit neatly next to your component code, but hooks required you to write that code to a whole separate file, maybe deal with JavaScript imports, etc.; While the feature did not make it into 1.0, in LiveView 1.1, you can now write:

And LiveView will automatically extract the JavaScript at compile time. The only extra plumbing you need is a new import in your app.js:

There are also two small changes needed in your esbuild configuration to tell it where to find the phoenix-colocated folder. We include that configuration by default for new Phoenix 1.8 apps, and we also have instructions in the changelog for existing apps.

Leave a Comment
Related Posts