2 ms·
> a too big a model is passed around between functions I guess, because it's annoying having to extract and pass the 3-4 values it needs You can always take an
by Kaze404 5y ago
> a too big a model is passed around between functions I guess, because it's annoying having to extract and pass the 3-4 values it needs
You can always take an extensible record type instead of the entire model.
type alias Model =
{ count : Int
, prop : String}
initialModel : Model
initialModel =
{ count = 0
, prop = "" }
foo : { a | prop: String } -> String
foo model = model.prop
bar = foo initialModel