Hologram.Page behaviour (hologram v0.6.5)
View SourceSummary
Callbacks
Initializes component and server structs (when run 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 init(%{required(atom()) => any()}, Hologram.Component.t(), Hologram.Server.t()) :: {Hologram.Component.t(), Hologram.Server.t()} | Hologram.Component.t() | Hologram.Server.t()
Initializes component and server structs (when run 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.