Summary
Callbacks
Handles a client-side action, typically triggered by a user interaction.
Handles a server-side command dispatched from the client.
Initializes the component and server structs on the server.
Returns a template in the form of an anonymous function that given variable bindings returns a DOM.
Functions
Casts page params to types specified with param/2 macro.
Defines page's layout metadata functions.
Accumulates the given param definition in params module attribute.
Returns the AST of code that registers params module attribute.
Defines page's route metadata functions.
Callbacks
@callback action(atom(), map(), Hologram.Component.t()) :: Hologram.Component.t()
Handles a client-side action, typically triggered by a user interaction.
@callback command(atom(), map(), Hologram.Server.t()) :: Hologram.Server.t()
Handles a server-side command dispatched from the client.
@callback init(%{required(atom()) => any()}, Hologram.Component.t(), Hologram.Server.t()) :: {Hologram.Component.t(), Hologram.Server.t()} | Hologram.Component.t() | Hologram.Server.t()
Initializes the component and server structs on the server.
Returns a template in the form of an anonymous function that given variable bindings returns a DOM.
Functions
@spec cast_params(%{required(atom() | String.t()) => any()}, module()) :: %{ required(atom()) => any() }
Casts page params to types specified with param/2 macro.
Defines page's layout metadata functions.
Accumulates the given param definition in params module attribute.
@spec register_params_accumulator() :: Hologram.Compiler.AST.t()
Returns the AST of code that registers params module attribute.
Defines page's route metadata functions.