78 words, 1 min read
β οΈ This post links to an external website. β οΈ
In this episode, letβs look at one of my favorite new features that was included with Phoenix LiveView 1.1 - colocated JavaScript Hooks.
So, what are colocated hooks?
A colocated hook lives alongside your component code. This makes writing simple hooks much easier. Instead of having to create a separate file, we can just add our hook to our HEEx component. Itβs a great feature when you need to add a bit of JavaScript to your LiveView components.
continue reading on elixircasts.io
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.