This module provides the tools to combine multiple pages into a single TEA component.
It can be used separately from Spa, in case it doesn't handle the complexity of your application (and if it's the case I am interested to know about it!).
Another use case is to progressively port a hand-written application to Spa, by embedding a PageStack in the existing application, then port pages to it one by one. Once all the pages are in the stack, the main application can be ported to Spa.
Setup a new stack
The defaultView is used when no other view can be applied, which should never happen if the application is properly defined.
Add a page to a Stack
The Stack Msg type
The Stack model
returns the current setup error if any
Build a message that signal a route change to the page stack
A page setup returns the page definition given the share current state
It can fail with a custom error
A route matcher is provided for each page. If it matches the route of its page, it returns the flags that will be passed to the page 'init' function
A view mapper, for example Html.map or Element.map depending on your actual view type.
A view mapper, for example Html.map or Element.map depending on your actual view type.
A Stack combines pages into a single TEA component