Janiczek/cmd-extra - version: 1.1.0

for more information visit the package's GitHub page

Package contains the following modules:

Cmd.Extra

Instead of

init : ( Model, Cmd Msg )
init =
    ( myModel, Cmd.none )

write

init : ( Model, Cmd Msg )
init =
    myModel
        |> withNoCmd

And instead of

incrementAndPing : Model -> ( Model, Cmd Msg )
incrementAndPing model =
    ( { model | counter = model.counter + 1 }
    , ping
    )

write

incrementAndPing : Model -> ( Model, Cmd Msg )
incrementAndPing model =
    { model | counter = model.counter + 1 }
        |> withCmd ping