Potential API tweak
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Application exposing (..., init, update, bundle, Initializer, Updater, Bundler) | |
type Initializer = | |
Initializer (Context -> ( Model, Cmd Msg, Cmd App.Msg)) | |
type Updater = | |
Updater (Context -> ( Model, Cmd Msg, Cmd App.Msg)) | |
type Bundler = | |
Bundler (Context -> Bundle Msg) | |
init : { page : Page } -> Initializer | |
update : { page : Page, model : Model, msg : Msg } -> Updater | |
view : { page : Page, model : Model } -> Bundler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Pages exposing (init, update, bundle) | |
init : Route -> Initializer | |
update : Msg -> Model -> Updater | |
view : Model -> Context -> Bundler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- CURRENT API -- | |
module Application exposing (..., init, update, bundle) | |
init : { page : Page } -> Context -> ( Model, Cmd Msg, Cmd App.Msg) | |
update : { page : Page, model : Model, msg : Msg } -> Context -> ( Model, Cmd Msg, Cmd App.Msg) | |
view : { page : Page, model : Model } -> Context -> Bundle Msg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Pages exposing (init, update, bundle) | |
init : Route -> Context -> ( Model, Cmd Msg, Cmd App.Msg) | |
update : Msg -> Model -> Context -> ( Model, Cmd Msg, Cmd App.Msg) | |
view : Model -> Context -> Bundle Msg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment