Cringe.App behaviour (cringe v0.3.1)

Copy Markdown View Source

Behaviour and macro for Cringe applications.

Summary

Callbacks

handle_event(t, term)

@callback handle_event(Cringe.Event.t(), term()) :: {:noreply, term()} | {:stop, term()}

init(keyword)

@callback init(keyword()) :: {:ok, term()} | {:stop, term()}

render(term)

@callback render(term()) :: Cringe.Document.t()