astynax/tea-combine

Combinator library for "The Elm Arcitecture"-powered applications


Keywords
combinator, elm, elm-architecture
License
MIT
Install
elm-package install astynax/tea-combine 1.1.0

Documentation

TEA Combine

A set of combinators for working with stateful (and effectful) components.

Using this library you can do this:

import Html
import TeaCombine exposing (..)
import TeaCombine.Pure exposing (..)
import TeaCombine.Pure.Pair exposing (..)

main =
    let
        labeled t v m = Html.label [] [Html.text t, v m]
    in
        Html.beginnerProgram
            { model = Counter.model <> CheckBox.model <> CheckBox.model
            , view = Html.div [] <<
                ( Counter.view
                     <::> labeled "1" CheckBox.view
                     <:: labeled "2" CheckBox.view
                )
            , update = Counter.update <&> CheckBox.update <&> CheckBox.update
            }

and have an app that looks like this:

screenshot

Examples (sources you can find here):