Closed c-mart closed 4 years ago
Sorry for your troubles, that shouldn't have happend.
On line 56 replace msg
with Msg
to make the Ellie code work.
The msgMapper
is used to make the same code work on the website as well as in the Ellie.
The msgMapper
-pattern is typically used to pass messages upwards. In Ellie it is not needed so i just pass in the identity
.
I would like to keep the msgMapper. It might be good to include a small comment how to remove it. Thanks for pointing this out
Right now I don't have access to a computer, so it might take some time until i'll add said comment.
This is not a problem with the library per se, more a request for some explanation regarding its usage. In many of the Ellie examples, even the simple ones like Button, there is a
msgMapper
pattern. Theidentity
function is passed in from the main function, through the view, to the Widget being used.@julianpistorius and I are having trouble understanding why this pattern is used/needed, and how it works. When we try to avoid using it, we get trapped in a mess of compiler errors related to type annotations. Here is an example of what happens when you try to take the
msgMapper
out of theWidget.button
example.We have been using elm-ui in Exosphere for a long time and are only now seeing this for the first time. Any links to related information would also be appreciated.
Thank you!