Hi there,
I’m new to Elixir and am trying to toggle a boolean value like JS but i think that is not possible. is there an easy way to do that?
def update(assigns, socket) do
socket
|> assign(:show_password, false)
|> reply(:ok)
end
def handle_event("show_password", _params, socket) do
socket
|> assign(:show_password, !:show_password)
|> reply(:noreply)
end
thank you all