If you ever seen this in the wild: ``` {:ok, assign(socket, %{my_variable: @my_variable my_other_variable: nil. yet_another_variable: nil })} ``` Remember that applying elixir's pipe operator makes everything better: ``` def mount(_session, socket) do socket = socket |> assign(:my_variable, @my_variable) |> assign(:my_other_variable, nil) |> assign(:yet_another_variable, nil) {:ok, socket} end ``` Nick Ciolpan 02 Sep 2020« Back to post