Skip to content

Instantly share code, notes, and snippets.

@ccapndave
Created April 27, 2016 09:38
Show Gist options
  • Save ccapndave/4429aa7cae440d6476f98800f9343a14 to your computer and use it in GitHub Desktop.
Save ccapndave/4429aa7cae440d6476f98800f9343a14 to your computer and use it in GitHub Desktop.
import Effects exposing (Effects)
type alias Model = {}
type Action
= Local Msg -- these are dealt with by this component
| Remove -- these are dealt with in update of the parent (by pattern matching against ThisComponent.Remove?)
type Msg
= DoA
| DoB
update : Action -> Model -> (Model, Effects Action)
update action model =
case action of
Local msg ->
updateLocal msg model
otherwise ->
( model, Effects.none )
updateLocal : Msg -> Model -> (Model, Effects Action)
updateLocal msg model =
case msg of
DoA ->
( model, Effects.none )
DoB ->
( model, Effects.none )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment