We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track

Iโm not a fan of writing
{:ok, socket}
and{:noreply, socket}
in all of my LiveViews. We canโt pipe into them!So, I typically introduce a couple of
ok/1
andnoreply/1
helpers in every single LiveView:def ok(socket), do: {:ok, socket} def noreply(socket), do: {:noreply, socket}
But it wasnโt until recently that a colleague of mine had the ๐ก brilliant idea to add them to the Web module!
Just drop them in the
MyAppWeb.live_view/0
function. Now, theyโre automatically included in all LiveViews! ๐ฅณ
continue reading on www.elixirstreams.com
โ ๏ธ This post links to an external website. โ ๏ธ
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.