E055 — Unsupported marked handler

Copy Markdown View Source

For app developers using the experimental LiveLift compiler.

LiveLift needs a literal event name, one unguarded clause per marked event and a supported socket update.

Illustrative rejection

def handle_event(event, _params, socket), do: {:noreply, socket}

Illustrative correction

def handle_event("inc", _params, socket), do: {:noreply, update(socket, :count, &(&1 + 1))}

Use @client :local for a pure synchronous handler writing independent display assigns. Give local actions separate write fields when a synchronized handler reads or writes the same assigns. For a supported timer use @client true.

Leave the handler unmarked to use Phoenix's normal event handling.