Closed MarcinGajda36 closed 4 years ago
There is error in update method in samples -> Elmish -> simple input currently there is:
let update (msg:Msg) (model:Model) = match msg with | ChangeValue newValue -> { Value = newValue }, Cmd.none
but it should be:
let update (msg:Msg) (model:Model) = match msg with | ChangeValue newValue -> { model with Value = newValue }, Cmd.none
Your current update method is not updating but creating completely new Model. If that is intentional you should not take (model:Model) as argument.
This is indeed an error
There is error in update method in samples -> Elmish -> simple input currently there is:
but it should be:
Your current update method is not updating but creating completely new Model. If that is intentional you should not take (model:Model) as argument.