diff --git a/snippets/elixir/he b/snippets/elixir/he new file mode 100644 index 0000000..824ffbc --- /dev/null +++ b/snippets/elixir/he @@ -0,0 +1,4 @@ +def handle_event("{event}", {map}, socket) do + {body} + {:noreply, socket} +end diff --git a/snippets/elixir/hi b/snippets/elixir/hi new file mode 100644 index 0000000..6f443f8 --- /dev/null +++ b/snippets/elixir/hi @@ -0,0 +1,4 @@ +def handle_info("{info}", {map}, socket) do + {body} + {:noreply, socket} +end diff --git a/snippets/elixir/hp b/snippets/elixir/hp new file mode 100644 index 0000000..1f359ad --- /dev/null +++ b/snippets/elixir/hp @@ -0,0 +1,4 @@ +def handle_params("{param}", {map}, socket) do + {body} + {:noreply, socket} +end diff --git a/snippets/elixir/liveview b/snippets/elixir/liveview index 178f6cb..be29027 100644 --- a/snippets/elixir/liveview +++ b/snippets/elixir/liveview @@ -1,5 +1,5 @@ defmodule {Package}.{Name}Live do - use {Package} + use {Package}, :live_view @impl true def mount(_params, _session, socket) do