NoRedInk/elm-sweet-poll/3.0.0

NOTE: this package is not compatible with Elm 0.19.1

SweetPoll

Configuration

type alias Config data =
{ url : String
, decoder : Decoder data
, delay : Time
, samesBeforeDelay : Int
, delayMultiplier : Float
, maxDelay : Time
}
defaultConfig : Decoder data -> String -> Config data

Default configuration for SweetPoll

Elm Artchitecture

type Model data

Private state of the SweetPoll component

type Msg data
init : Config data -> ( Model data, Cmd (Msg data) )
Msg data
-> Model data
-> ( Model data, Maybe data, Cmd (Msg data) )

The SweetPoll StartApp-style update function

Returns:

  • The new SweetPoll model
  • The current data, if there is any
  • A command to keep SweetPoll running