Redux and Reframe II: Influences and Origins

— MODELtype alias Model = Intinit : Modelinit = 0— UPDATEtype Msg = Increment | Decrementupdate : Msg -> Model -> Model update msg model =   case msg of    Increment ->     model + 1    Decrement ->     model — 1— VIEWview : Model -> Html Msgview model =  div []   [ button [ onClick Decrement ] [ text “-” ]   , div [] [ text (String.fromInt model) ]   , button [ onClick Increment ] [ text “+” ]   ][1]

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store