# `Hologram.Page`
[🔗](https://github.com/bartblast/hologram/blob/v0.8.3/lib/hologram/page.ex#L1)

# `init`

```elixir
@callback init(%{required(atom()) =&gt; 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).

# `template`

```elixir
@callback template() :: (map() -&gt; list())
```

Returns a template in the form of an anonymous function that given variable bindings returns a DOM.

# `cast_params`

```elixir
@spec cast_params(%{required(atom() | String.t()) =&gt; any()}, module()) :: %{
  required(atom()) =&gt; any()
}
```

Casts page params to types specified with param/2 macro.

# `layout`
*macro* 

```elixir
@spec layout(
  module(),
  keyword()
) :: Macro.t()
```

Defines page's layout metadata functions.

# `param`
*macro* 

```elixir
@spec param(atom(), atom(), Hologram.Commons.Types.opts()) :: Macro.t()
```

Accumulates the given param definition in __params__ module attribute.

# `register_params_accumulator`

```elixir
@spec register_params_accumulator() :: Hologram.Compiler.AST.t()
```

Returns the AST of code that registers __params__ module attribute.

# `route`
*macro* 

```elixir
@spec route(String.t()) :: Macro.t()
```

Defines page's route metadata functions.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
