Page

This module is responsible to handle subpages.

Types

type Msg

The subpages messages.

type Page

An opaque type to store the subpage and its model.

Creation

An empty page.

Routing

changeRouteTo : Maybe Route -> Session -> Page -> ( Page, Effect Msg )

Return the page and associated effects associated to a route change.

View

view : Env -> Session -> Page -> Document Msg

Turns the page into an HTML page.

mapDocument : (msg1 -> msg2) -> Document msg1 -> Document msg2

Transform the messages produced by the page.

Update

update : Msg -> Page -> ( Page, Effect Msg )

Update the page from a message, returning an updated page and effects.