This module provides a Effect type that carry both Cmd and messages for
a shared update
Build an effect that attempts a Task
Transform the messages produced by an Effect. Similar to
Cmd.map.
Convert a collection of effect to a connection of
Cmd
These functions join an effect to a given model, for using pipeline syntax in your 'update' functions
Wraps the model with the given Effect
Wraps the model with Effect.none
init : ( Model, Effect Msg )
init =
myModel
|> Effect.withNoneWraps the model with a list of Effect
init : ( Model, Effect Msg )
init =
myModel
|> Effect.withBatch [ someEffect, anotherEffect ]Wraps the model with a Cmd
init : ( Model, Effect Msg )
init =
myModel
|> Effect.withCmd someCmdWraps the model with a mapped effect. Should only be used in top-level packages
init : ( Model, Effect Msg )
init =
myModel
|> Effect.withMap SharedMsg Shared.refreshIdentityWraps the model with an affect that performs a Task
Wraps the model with an affect that attempts a Task
These functions add a new effect to a given (model, effect) pair, for using pipeline syntax in your 'update' functions
Add a new Effect to an existing model-Effect pair
Add a list of new Effect to an existing model-Effect pair
Add a Cmd to an existing
model-Effect pair
Add a new mapped Effect to an existing model-Effect pair
Add an affect that performs a Task to an existing model-Effect pair
A collection of shared and platform effects