home73k/lib/home73k_web/live/live_helpers.ex

18 lines
445 B
Elixir
Raw Permalink Normal View History

defmodule Home73kWeb.LiveHelpers do
@moduledoc """
Functions to make working with Phoenix LiveView a little easier.
"""
@doc """
Performs the {:noreply, socket} for a given socket.
This helps make the noreply pipeable
"""
def live_noreply(socket), do: {:noreply, socket}
@doc """
Performs the {:ok, socket} for a given socket.
This helps make the ok reply pipeable
"""
def live_okreply(socket), do: {:ok, socket}
end